projects
/
project
/
unetd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4d25c6b
)
network: fix writing domain suffix to hosts file
author
Felix Fietkau
<nbd@nbd.name>
Tue, 23 Aug 2022 21:37:27 +0000
(23:37 +0200)
committer
Felix Fietkau
<nbd@nbd.name>
Tue, 23 Aug 2022 21:37:27 +0000
(23:37 +0200)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
main.c
patch
|
blob
|
history
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));
- 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 : "");
}
}