projects
/
project
/
unetd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
network: fix writing domain suffix to hosts file
[project/unetd.git]
/
main.c
diff --git
a/main.c
b/main.c
index c9ce132a2cfa616d88f92c619cfd9d2b5cec4c14..9926ecdc3e47e821632dd00e49b93ddc69e1256d 100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-32,7
+32,9
@@
network_write_hosts(struct network *net, FILE *f)
avl_for_each_element(&net->hosts, host, node) {
inet_ntop(AF_INET6, &host->peer.local_addr, ip, sizeof(ip));
avl_for_each_element(&net->hosts, host, node) {
inet_ntop(AF_INET6, &host->peer.local_addr, ip, sizeof(ip));
- fprintf(f, "%s\t%s\n", ip, network_host_name(host));
+ fprintf(f, "%s\t%s%s%s\n", ip, network_host_name(host),
+ net->config.domain ? "." : "",
+ net->config.domain ? net->config.domain : "");
}
}
}
}