Feature #1917

DHCP server support for multiple domains in search list

Added by Chris Buechler over 2 years ago. Updated almost 2 years ago.

Status:Resolved Start date:09/28/2011
Priority:Normal Due date:
Assignee:Pierre POMES % Done:

100%

Category:DHCP Server
Target version:2.1
Affected version:2.0.1 Affected Architecture:

Description

The DHCP server's search list only supports a single domain, should be extended to support multiple domains such as:

option domain-search "example.com", "sales.example.com", "eng.example.com";

Associated revisions

Revision 42a3cbab
Added by Pierre POMES about 2 years ago

Ticket #1917 - DHCP server support for multiple domains in search list

Revision a3de8b9e
Added by Pierre POMES about 2 years ago

Ticket #1917: fix typos, fix domain-search for dhcpv6

Revision b80e57d4
Added by Jim P almost 2 years ago

Pull in fix for Ticket #1917 to RELENG_2_0 as well.

Revision 84931046
Added by Jim P almost 2 years ago

Back out duplicated fix from 107e8acc - Ticket #1917 was already fixed before this was added.

History

#1 Updated by Fabien Grumelard over 2 years ago

To solve this problem, I've written this patch:

--- /etc/inc/services.inc.org    2011-10-05 12:41:46.000000000 +0200
+++ /etc/inc/services.inc    2011-10-05 12:40:48.000000000 +0200
@@ -242,7 +242,7 @@
         }

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

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

#2 Updated by Chris Buechler over 2 years ago

Needs input validation in web interface as well, that doesn't suffice.

#3 Updated by Wayne Scott over 2 years ago

Can we do something here? Right now it doesn't work at all.

#4 Updated by Pierre POMES about 2 years ago

  • Status changed from New to Feedback
  • Assignee set to Pierre POMES
  • Target version set to 2.1
  • % Done changed from 0 to 100
  • Affected version set to 2.0.1

#5 Updated by Jim P almost 2 years ago

Looks like someone also checked in a fix in 107e8acc that broke this again. It appears the fix on this ticket is better, so I'll remove the other one.

#6 Updated by Jim P almost 2 years ago

  • Status changed from Feedback to Resolved

Also available in: Atom PDF