From 82fbb5c2f560b94cf6e2f49cb05ea358d40ee54b Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Fri, 15 Jan 2016 16:58:12 +0100 Subject: [PATCH] privops: reload DNS configuration The helper process needs to call res_init() before DNS_Name2IPAddress() in order to see changes in resolv.conf. --- privops.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/privops.c b/privops.c index 9b4094a..3076863 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); }