From: Miroslav Lichvar Date: Fri, 15 Jan 2016 15:58:12 +0000 (+0100) Subject: privops: reload DNS configuration X-Git-Tag: 2.3-pre1~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=82fbb5c2f560b94cf6e2f49cb05ea358d40ee54b;p=thirdparty%2Fchrony.git privops: reload DNS configuration The helper process needs to call res_init() before DNS_Name2IPAddress() in order to see changes in resolv.conf. --- diff --git a/privops.c b/privops.c index 9b4094ad..30768638 100644 --- a/privops.c +++ b/privops.c @@ -291,6 +291,9 @@ do_name_to_ipaddress(ReqName2IPAddress *req, PrvResponse *res) { /* make sure the string is terminated */ req->name[sizeof (req->name) - 1] = '\0'; + + DNS_Reload(); + res->rc = DNS_Name2IPAddress(req->name, res->data.name_to_ipaddress.addresses, DNS_MAX_ADDRESSES); }