dcantrell/ldap-for-dhcp — Issue #9: subclasses generated within class instead after class
Author: jinkama-san
Created: 2012-02-22 18:43:59+00:00
State: open

Hi,

there seems to be some misunderstanding with the subclass statement. A dhcpd.conf with subclasses should look like that:

class "testsubclass" {
match pick-first-value (option dhcp-client-identifier, hardware);
}

subclass "testsubclass" 1:00:01:02:03:04:05 {
option root-path "samsara:/var/diskless/alphapc";
}

But with the ldap-patch a dhcpd.conf like this is generated:

class "testsubclass" {
match pick-first-value (option dhcp-client-identifier, hardware);
subclass "testsubclass" 1:00:01:02:03:04:05 {
option root-path "samsara:/var/diskless/alphapc";
}
}

Using dhcpd -t on a dhcpd-test.conf with the above lines yields:

# /usr/sbin/dhcpd -cf dhcpd-test.conf -t
Internet Systems Consortium DHCP Server 4.2.1-P1
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
dhcpd-test.conf line 3: class declarations not allowed here.
subclass
^
Configuration file errors encountered -- exiting

When I convert the working example to a LDIF and load it into openLDAP, the dhcpd will barf just like for the non-working example and checking dhcp-ldap-startup.log will show the non-working configuration.

This is with the dhcpd from Fedora15 dhcp-4.2.1-14.P1.fc15.x86_64.rpm or dhcp-3.0.7 from SLES10SP4. I didn't see anything in the ISC dhcp-4.2.3-P2 release notes related to that, so I guess it's still affected too.