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

    DHCP domain search list bug and fix

    Scheduled Pinned Locked Moved DHCP and DNS
    2 Posts 1 Posters 3.1k Views
    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.
    • O Offline
      ovidiu
      last edited by

      Hi,

      I'm running pfSense 2.0.1 and found a bug in the DHCP server's domain search list with MacOS X clients. For the Mac clients to receive the correct domain search list, I need to add the following in /var/dhcpd/etc/dhcpd.conf:

      option domain-search "domain1", "domain2", "domain3";

      Assuming the list of domain search list in the DHCP server's page is a space separated list of domain names, the patch below generates the appropriate output.

      I'd appreciate if you could include this patch in the next release.

      Thanks,
      Ovidiu

      –- services.inc.orig 2012-03-23 21:09:07.000000000 -0700
      +++ services.inc 2012-03-23 21:09:40.000000000 -0700
      @@ -39,6 +39,10 @@
      pfSense_MODULE: utils
      */

      +function strify($str) {

      • return '"' . $str . '"';
        +};

      function services_dhcpd_configure() {
      global $config, $g;

      @@ -243,6 +247,8 @@

      if($dhcpifconf['domainsearchlist'] <> "") {
      $dnscfg .= " option domain-search-list "{$dhcpifconf['domainsearchlist']}";\n";

      • $domains = implode(',', array_map(strify, explode(' ', $dhcpifconf['domainsearchlist'])));
      • $dnscfg .= " option domain-search {$domains};\n";
            }

      if (isset($dhcpifconf['ddnsupdate'])) {

      1 Reply Last reply Reply Quote 0
      • O Offline
        ovidiu
        last edited by

        Just as a follow up, I submitted this change for review and it has been committed in github.

        https://github.com/bsdperimeter/pfsense/pull/69

        It should appear in the next release of pfSense.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.