From 11ee0c6d6f311215411cc0d15298ad075864ad2e Mon Sep 17 00:00:00 2001 From: Brett Keller Date: Thu, 22 Dec 2016 12:27:24 -0600 Subject: Add new "Ignore client identifiers" DHCP feature Exposes the underlying dhcpd configuration option "ignore-client-uids" in the pfSense "Services / DHCP Server" GUI by adding an "Ignore client identifiers" checkbox. As of ISC dhcpd version 4.3.0+, there is a new configuration statement available, "ignore-client-uids". According to the ISC's documentation, "If the 'ignore-client-uids' statement is present and has a value of 'true' or 'on', the UID for clients will not be recorded." While this behavior does not strictly adhere to the DHCP specification, it can be very useful in environments where devices on the network dual boot or PXE boot. Normally, if the network stacks in a single device's different operating systems (including PXE firmware) make DHCP requests with differing client identifiers, the server will treat each request with a unique identifier as having come from a unique client, even when they come from the same device. Thus, different operating systems on the same device and NIC might hold different leases with different IP addresses. Once activated, the "ignore-client-uids" option tells the DHCP server not to record client identifiers in new DHCP leases, which forces the server to fall back on hardware (MAC) addresses to uniquely identify clients. Now different operating systems on the same device and NIC will hold the same lease (based on MAC address), which should keep a device's IP address consistent regardless of its currently running operating system. Same as with most other general and pool-specific DHCP server options in pfSense, note that turning on this option only affects new leases. Any leases that existed prior to enabling this option will still contain their respective client identifiers. Manually deleting older leases or flushing the entire lease table can expedite a full migration to the new server behavior, if desired. --- src/etc/inc/services.inc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/etc/inc/services.inc') diff --git a/src/etc/inc/services.inc b/src/etc/inc/services.inc index cfda822..dded825 100644 --- a/src/etc/inc/services.inc +++ b/src/etc/inc/services.inc @@ -885,6 +885,11 @@ EOPP; $dhcpdconf .= " ignore bootp;\n"; } + // ignore-client-uids + if (isset($poolconf['ignoreclientuids'])) { + $dhcpdconf .= " ignore-client-uids true;\n"; + } + // netbios-name* if (is_array($poolconf['winsserver']) && $poolconf['winsserver'][0] && ($poolconf['winsserver'][0] != $dhcpifconf['winsserver'][0])) { $dhcpdconf .= " option netbios-name-servers " . join(",", $poolconf['winsserver']) . ";\n"; -- cgit v1.1