diff --git a/riggerd/reshook.c b/riggerd/reshook.c index c5e6250..f35d4af 100644 --- a/riggerd/reshook.c +++ b/riggerd/reshook.c @@ -256,6 +256,9 @@ void hook_resolv_localhost(struct cfg* cfg) win_set_resolv("127.0.0.1"); #else /* not on windows */ # ifndef HOOKS_OSX /* on Linux/BSD */ + if (system("/usr/libexec/dnssec-trigger-script --setup") == 0) + return; + if(really_set_to_localhost(cfg)) { /* already done, do not do it again, that would open * a brief moment of mutable resolv.conf */ @@ -281,6 +284,9 @@ void hook_resolv_iplist(struct cfg* cfg, struct probe_ip* list) #if defined(HOOKS_OSX) || defined(USE_WINSOCK) char iplist[10240]; iplist[0] = 0; +#else + if (system("/usr/libexec/dnssec-trigger-script --restore") == 0) + return; #endif set_to_localhost = 0; if(cfg->noaction) @@ -323,7 +329,8 @@ void hook_resolv_flush(struct cfg* cfg) (void)cfg; #ifdef HOOKS_OSX /* dscacheutil on 10.5 an later, lookupd before that */ - system("dscacheutil -flushcache || lookupd -flushcache"); + system("dscacheutil -flushcache || lookupd -flushcache || discoveryutil udnsflushcaches"); + system("discoveryutil mdnsflushcache"); #elif defined(USE_WINSOCK) win_run_cmd("ipconfig /flushdns"); #else