• Print
  • Share
  • Dark

LDAP and updating to DHCP 4.3.3 or newer

  • Updated on 26 Oct 2018
  • 1 minute to read
  • Contributors

The LDAP integration code for ISC DHCP was originally contributed to ISC and for the most part has not been directly supported by ISC staff. Bugs reported against it were left to be addressed by contributors, and with our limited development resources the contributed patches accumulated without being merged into the product. 

As part of our release of 4.3.3 we took it upon ourselves to comb through all of the LDAP-related patches and merged them into the source. While we here at ISC conducted limited testing there were several contributors who did test it prior to the release, so by the time of the release our confidence in the usability of the LDAP integration was reasonably high. Most of the changes were seamless to users, but there was one change in particular that we later discovered can cause incompatibility issues when updating to 4.3.3.

Prior to 4.3.3, double quotes (") were required around the value assigned to the attribute dhcpClassData. This attribute specifies the parent class for subclasses. Apparently having to quote these values was a work-around and one of the patches included in 4.3.3 removed the need for them, providing a cleaner, more consistent approach. So prior to the release of 4.3.3, dhcpClassData values must be included in quotes:

dhcpClassData: "Student"

But as of 4.3.3, they no longer need to be, and in fact must not be enclosed in quotes:

dhcpClassData: Student

This change is neither forward- nor backward-compatible and causes configuration parsing errors when the values are enclosed in quotes. Given the following LDAP snippet:

dn: cn=64:d4:da:22:4e:64,ou=subclasses,ou=hosts,cn=DHCP Config,dc=dhcp
cn: 64:d4:da:22:4e:64
dhcpClassData: "Student"
dhcpComments: johndoe

4.3.3 and later will produce a parsing error log message like this:

Found LDAP entry 'ou=hosts,cn=DHCP Config,dc=dhcp'
Parsing external DNs for 'ou=hosts,cn=DHCP Config,dc=dhcp'
Found LDAP entry 'ou=subclasses,ou=hosts,cn=DHCP Config,dc=dhcp'
Parsing external DNs for 'ou=subclasses,ou=hosts,cn=DHCP Config,dc=dhcp'
Found LDAP entry 'cn=64:d4:da:22:4e:64,ou=subclasses,ou=hosts,cn=DHCP Config,dc=dhcp'
Parsing external DNs for 'cn=64:d4:da:22:4e:64,ou=subclasses,ou=hosts,cn=DHCP Config,dc=dhcp'
Sending config portion 'subclass ""Student"" 64:d4:da:22:4e:64 {
LDAP line 206: no class named
subclass ""

For these entries to parse correctly, the quotes must be removed. 

One way to deal with this is to export the directory content to an ldif and scrub the double quotes from each line containing dhcpDataClass, and then import the scrubbed ldif.

Was this article helpful?