From: Vincent Bernat Date: Fri, 6 Mar 2009 10:55:30 +0000 (+0100) Subject: Call res_init in case of failure to resolv names X-Git-Tag: 0.4.0~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c933faf61396cf9c9779a65e25aac5c0101140b1;p=thirdparty%2Flldpd.git Call res_init in case of failure to resolv names --- diff --git a/src/priv.c b/src/priv.c index 21f4bf99..e087cca4 100644 --- a/src/priv.c +++ b/src/priv.c @@ -39,6 +39,9 @@ #include #include #include +#include +#include +#include enum { PRIV_PING, @@ -235,7 +238,8 @@ asroot_gethostbyname() if (uname(&un) != 0) fatal("[priv]: failed to get system information"); if ((hp = gethostbyname(un.nodename)) == NULL) { - LLOG_WARN("[priv]: unable to get system name"); + LLOG_INFO("[priv]: unable to get system name"); + res_init(); len = strlen(un.nodename); must_write(remote, &len, sizeof(int)); must_write(remote, un.nodename, len + 1);