]> git.ipfire.org Git - people/ms/dnsmasq.git/commitdiff
Correct logic for when to start helper.
authorSimon Kelley <simon@thekelleys.org.uk>
Thu, 31 Dec 2015 16:18:11 +0000 (16:18 +0000)
committerSimon Kelley <simon@thekelleys.org.uk>
Thu, 31 Dec 2015 18:52:38 +0000 (18:52 +0000)
src/dnsmasq.c

index 229693fb5228d0a24e6fadb704383ff4269f6d53..4ab56f1610750f16ef2afb86a369406f3aa906c3 100644 (file)
@@ -249,7 +249,7 @@ int main (int argc, char **argv)
      The script subsystrm relies on DHCP buffers, hence the last two
      conditions below. */  
   if (daemon->dhcp || daemon->doing_dhcp6 || daemon->relay4 || 
-      daemon->relay6 || option_bool(OPT_TFTP) || option_bool(OPT_ADD_MAC))
+      daemon->relay6 || option_bool(OPT_TFTP) || option_bool(OPT_DNS_CLIENT))
     {
       dhcp_common_init();
       if (daemon->dhcp || daemon->doing_dhcp6)
@@ -556,7 +556,7 @@ int main (int argc, char **argv)
    /* if we are to run scripts, we need to fork a helper before dropping root. */
   daemon->helperfd = -1;
 #ifdef HAVE_SCRIPT 
-  if ((daemon->dhcp || daemon->dhcp6 || option_bool(OPT_TFTP) || option_bool(OPT_ADD_MAC)) && 
+  if ((daemon->dhcp || daemon->dhcp6 || option_bool(OPT_TFTP) || option_bool(OPT_DNS_CLIENT)) && 
       (daemon->lease_change_command || daemon->luascript))
       daemon->helperfd = create_helper(pipewrite, err_pipe[1], script_uid, script_gid, max_fd);
 #endif