DHCP Server Adding custom options with LDAP


I’m trying to add the following custom rule which would normally be added to dhcpd.conf, however in my case all of the configuration is stored in LDAP.

option space ubnt;
option ubnt.unifi-address code 1 = ip-address;

class "ubnt" {
        match if substring (option vendor-class-identifier, 0, 4) = "ubnt";
        option vendor-class-identifier = "ubnt";
        vendor-option-space ubnt;

I don’t see a way to do this in YaST. Note that this is on 42.3. I haven’t migrated my server to 15.0 (and I’m not looking forward to it).

I tried using dhcpd-conf-to-ldap to create a LDIF file, but it can’t be imported using ldapadd.

It would be great if YaST could support custom options and classes like this.

The resulting LDIF file is:

dn: cn=yyyyy, dc=xxxxxx,dc=org
cn: yyyyy
objectClass: top
objectClass: dhcpServer
dhcpServiceDN: cn=DHCP Config, dc=xxxxxx,dc=org

dn: cn=DHCP Config, dc=xxxxxx,dc=org
cn: DHCP Config
objectClass: top
objectClass: dhcpService
objectClass: dhcpOptions
dhcpPrimaryDN: cn=yyyyy, dc=xxxxxx,dc=org
dhcpOption: space ubnt
dhcpOption: ubnt.unifi-address code 1 = ip-address

dn: cn=ubnt, cn=DHCP Config, dc=xxxxxx,dc=org
cn: ubnt
objectClass: top
objectClass: dhcpClass
objectClass: dhcpOptions
dhcpStatements: match if substring (option vendor-class-identifier, 0, 4) = "ubnt"
dhcpStatements: vendor-option-space ubnt
dhcpOption: vendor-class-identifier = "ubnt"



There are warnings in the openSUSE documentation that, when the DHCP server is using LDAP, then the LDAP environment has to be setup before the YaST DHCP module can be used for further administration: <https://doc.opensuse.org/documentation/leap/reference/html/book.opensuse.reference/cha.dhcp.html#sec.dhcp.yast>
Also: <https://doc.opensuse.org/documentation/leap/security/html/book.security/cha.security.ldap.html#sec.security.ldap.yast.usergr> and
<https://doc.opensuse.org/documentation/leap/security/html/book.security/cha.security.ldap.html#sec.security.ldap.slapd>.The initial YaST LDAP administration form seems to offer the possibility to setup options and especially search filters for the users and groups in the LDAP database.