projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Always call res_init() before getaddrinfo().
[tinc]
/
src
/
net_setup.c
diff --git
a/src/net_setup.c
b/src/net_setup.c
index
765a9eb
..
121b989
100644
(file)
--- a/
src/net_setup.c
+++ b/
src/net_setup.c
@@
-813,6
+813,10
@@
static bool setup_myself(void) {
hint.ai_protocol = IPPROTO_TCP;
hint.ai_flags = AI_PASSIVE;
+#ifdef HAVE_DECL_RES_INIT
+ // ensure glibc reloads /etc/resolv.conf.
+ res_init();
+#endif
err = getaddrinfo(address && *address ? address : NULL, port, &hint, &ai);
free(address);