dhcpd 4.2 no longer knows ns-update operator

Shawn Routhier sar at isc.org
Fri Feb 3 18:05:15 UTC 2012


It was intentional.  That code was part of an older style of DDNS processing
that we are attempting to deprecate.  

In theory the current DDNS code should be cleaning up after expired and
released leases.  There was an issue with DDNS cleanup in IPv6 that
was recently fixed.  

Shawn

On Feb 3, 2012, at 8:22 AM, Jiri Popelka wrote:

> Hi,
> 
> the code for parsing ns-update operator is not compiled by default because
> it's (common/parse.c:4042) in
> #if defined(NSUPDATE_OLD)
> #endif
> and NSUPDATE_OLD is not defined by default.
> 
> Can somebody from ISC confirm that parsing of ns-update operator was removed intentionally ?
> 
> Thanks.
> 
> If that's a bug (you had wanted to remove only parsing or dns-update and dns-delete but not ns-update),
> then the fix is easy (see attached patch).
> 
> --
> Jiri
> 
> On 02/01/2012 11:21 AM, Eddie Lania wrote:
>> Description of problem: I am trying this in my dhcpd.conf:
>> 
>> # start here
>> option oe-key     code 159 = string;
>> option oe-gateway code 160 = ip-address;
>> 
>> on commit {
>>   if (not static and
>>       ((config-option server.ddns-updates = null) or
>>        (config-option server.ddns-updates != 0))) {
>> 
>>       if exists oe-key {
>>         set ddns-rev-name =
>>            concat (binary-to-ascii (10, 8, ".",
>>                                      reverse (1, leased-address)), ".",
>>                     pick (config-option server.ddns-rev-domainname,
>>                           "in-addr.arpa."));
>> 
>>        set full-oe-key = option oe-key;
>> 
>>        switch (ns-update (delete (IN, 25, ddns-rev-name, null),
>>                            add (IN, 25, ddns-rev-name, full-oe-key,
>>                                lease-time / 2)))
>>        {
>>        default:
>>          unset ddns-rev-name;
>>          break;
>>        case NOERROR:
>>          on release or expiry {
>>            switch (ns-update (delete (IN, 25, ddns-rev-name, null))) {
>>            case NOERROR:
>>              unset ddns-rev-name;
>>              break;
>>            }
>>          }
>>        }
>>      }
>>   }
>> }
>> # stop here
>> 
>> My goal is to clean up dns records for released or expired dhcp leases.
>> 
>> The script above was found on the internet.
>> 
>> The problem is that dhcpd will not start with this code but fails with a
>> message:
>> 
>>  /etc/dhcp/dhcpd.conf line 131: expecting data or numeric expression.
>>         switch (ns-update
>>                 ^
>>  Configuration file errors encountered -- exiting
>> 
>> 
>> I cannot find anything on the net how this should be solved.
>> Is it a bug?
> 
> <dhcp-4.2.3-P2-ns-update.patch>




More information about the dhcp-users mailing list