dhcp-ldap: multiple dhcpRanges in pool context

Dan dan at telcohero.com
Fri Apr 25 17:30:06 UTC 2008


I found an old post regarding this:

http://marc.info/?l=dhcp-server&m=104582978201904&w=2

The code in http://home.ntelos.net/~masneyb/dhcp-3.0.5-ldap-patch 
matches that post almost exactly except ldap_parse_subnet differs from 
ldap_parse_pool.

Only ldap_parse_subnet matches the rewrite, ldap_parse_pool still contains 
the old code and does not support multiple dhcpRanges.  I receive the same 
error described in the post above as it appends all ranges into one 
range-statement.

It seems to me ldap_parse_pool should also contain:

   if ((tempstr = ldap_get_values (ld, item->ldent, "dhcpRange")) != NULL)
     {
       for (i=0; tempstr[i] != NULL; i++)
         {
           x_strncat (cfile->inbuf, "range", LDAP_BUFFER_SIZE);
           x_strncat (cfile->inbuf, " ", LDAP_BUFFER_SIZE);
           x_strncat (cfile->inbuf, tempstr[i], LDAP_BUFFER_SIZE);
           x_strncat (cfile->inbuf, ";\n", LDAP_BUFFER_SIZE);
         }
       ldap_value_free (tempstr);
     }

Am I missing something?  Is someone on-list maintaining this patch?


Thanks,

Dan


More information about the dhcp-users mailing list