X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fnet_setup.c;h=121b989279bff7a810d316cc9737396bb33ff43e;hp=765a9ebf37a1ea0bd11b01c49b84247b6e76d87c;hb=09d60499af3acef2ba9bd7be15e8d1c44249f8d5;hpb=35724cf4b833173b3b993c67239fa066d88fb2d8 diff --git a/src/net_setup.c b/src/net_setup.c index 765a9ebf..121b9892 100644 --- 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);