DHCP with LDAP config should load class definitions first

Bug #673427 reported by Karsten Becker
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dhcp3 (Ubuntu)
Expired
Wishlist
Unassigned

Bug Description

Binary package hint: dhcp3-server-ldap

Take as example the following dhcpd.conf (just as example, it's syntax is not right):

global parameters...

class "VoIP_Phones" {
   match if (substring (hardware,1,3)=00:04:13);
}

class "Other_Clients" {
   match if not (substring (hardware,1,3)=00:04:13);
}

subnet 204.254.239.0 netmask 255.255.255.224 {
   subnet-specific parameters...

   pool "VoIP" {
      allow members of "VoIP_Phones";
      deny members of "Other_Clients";

      pool-specific parameters...
   }

   pool "VoIP" {
      deny members of "VoIP_Phones";
      allow members of "Other_Clients";

      pool-specific parameters...
   }
}

If you want to have such kind of configuration LDAP based, you would create corresponding LDIF files and load them in the LDAP.

But - and that's tricky - you need to ensure to load all classes that get referenced by the pool declarations later get loaded into the LDAP before the pool declarations.

In other words - DHCP does not automatically load class declarations first. If you you first save the pools into LDAP, followed by the classes, DHCP will throw an error on restart because it finds the reference to the class before the class declaration itself.

Revision history for this message
Karsten Becker (karstenrbecker) wrote :

Uuups, of course it's

class "Other_Clients" {
   match if not (substring (hardware,1,3)=00:04:13);
}

description: updated
Revision history for this message
Mathias Gug (mathiaz) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better.

Could you provide a valid dhcp configuration file as well as ldif files so that reproducing your issue is straight-forward?

Changed in dhcp3 (Ubuntu):
importance: Undecided → Wishlist
status: New → Incomplete
Revision history for this message
Karsten Becker (karstenrbecker) wrote :

Traditional dhcpd.conf

Revision history for this message
Karsten Becker (karstenrbecker) wrote :

dhcpd.conf for LDAP saved configuration

Revision history for this message
Karsten Becker (karstenrbecker) wrote :

LDIF with DHCP configuration

Revision history for this message
Karsten Becker (karstenrbecker) wrote :

As you can see in the LDIF, the classes are declared before the pools. If you don't do that, DHCPD will throw an error.

To take care of the correct order is "easy" if you load the stuff manually with LDIF files in the LDAP. But we use GoSA (www.gosa-project.org) here, which provides a graphical webgui to administer ther DHCP via LDAP. So we cannot take care of the right order.

To load classes before other declarations if the config is saved in LDAP should be provided natively by DHCP. That's my wish...

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for dhcp3 (Ubuntu) because there has been no activity for 60 days.]

Changed in dhcp3 (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.