Navigation

    Netgate Discussion Forum
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search

    Dns forwarder not working .. bug ? in /etc/inc/services.inc

    DHCP and DNS
    4
    5
    2750
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      hsang last edited by

      Bug in services.inc for BETA4 ?

      my dns forwarder can't seem start..

      did a look in the sources and  managed to solve it in /etc/inc/services.inc

      changed the line

      if (isset($dnsmasq['dnsmasq']['enable'])) {

      to

      if (isset($config['dnsmasq']['enable'])) {

      .. and all the changes in bold

      if (isset($config['dnsmasq']['enable'])) {
                      if ($g['booting'])
                              echo "Starting DNS forwarder… ";
                      else
                              sleep(1);

      /* generate hosts file */
                      system_hosts_generate();
                      $args = "";

      if (isset($config['dnsmasq']['regdhcp'])) {
                              $args .= " -l {$g['dhcpd_chroot_path']}/var/db/dhcpd.leases" .
                                      " -s {$config['system']['domain']}";
                      }

      if (isset($config['dnsmasq']['domainoverrides']) && is_array($config['dnsmasq']['domainoverrides'])) {
                              foreach($config['dnsmasq']['domainoverrides'] as $override) {
                                      $args .= ' –server=/' . $override['domain'] . '/' . $override['ip'];
                              }
                      }

      /* run dnsmasq */
                      mwexec("/usr/local/sbin/dnsmasq {$args}");

      if ($g['booting'])
                              echo "done.\n";

      }

      is this a bug? or is <dnsmasq>in config.xml supposed to fall under <interfaces>?</interfaces></dnsmasq>

      1 Reply Last reply Reply Quote 0
      • H
        hoba last edited by

        If you are running a full install run a "cvs_syn.sh RELENG_1" from the shell (and be patient, it takes some time). Reboot after that. Not sure where your problem is but I never have heard from this bug before and beta4 is rather old though the latest official build on the mirrors. RC1 should be released in the near future.

        1 Reply Last reply Reply Quote 0
        • S
          sullrich last edited by

          I am not sure where you are finding this code but in my /etc/inc/services.inc it shows:

          if (isset($config['dnsmasq']['enable'])) {

          if ($g['booting'])
          echo "Starting DNS forwarder… ";
          else
          sleep(1);

          /* generate hosts file */
          system_hosts_generate();

          $args = "";

          if (isset($config['dnsmasq']['regdhcp'])) {

          Notice it uses $config already.

          Why is your code different?

          1 Reply Last reply Reply Quote 0
          • B
            billm last edited by

            @sullrich:

            I am not sure where you are finding this code but in my /etc/inc/services.inc it shows:

            if (isset($config['dnsmasq']['enable'])) {

            if ($g['booting'])
            echo "Starting DNS forwarder… ";
            else
            sleep(1);

            /* generate hosts file */
            system_hosts_generate();

            $args = "";

            if (isset($config['dnsmasq']['regdhcp'])) {

            Notice it uses $config already.

            Why is your code different?

            Because he's running HEAD.  Same issue with dnsmasq I bitched about, but haven't fixed cause it was part of the multi-interface code you were writing and I didn't feel like either backing out the broken code or finishing the implementation :)

            Guess I'll file a ticket against HEAD though as a placeholder for this bug.

            –Bill

            pfSense core developer
            blog - http://www.ucsecurity.com/
            twitter - billmarquette

            1 Reply Last reply Reply Quote 0
            • S
              sullrich last edited by

              To the original poster:  I am sure you know the rules of running -HEAD.  We are terminating this thread now.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post