Bug 786357 - dhcpd 4.2 no longer knows ns-update operator
dhcpd 4.2 no longer knows ns-update operator
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: dhcp (Show other bugs)
16
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Jiri Popelka
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-01 03:01 EST by Eddie Lania
Modified: 2012-02-04 02:44 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-02-04 02:43:06 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Eddie Lania 2012-02-01 03:01:29 EST
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 messge:

 /etc/dhcp/dhcpd.conf line 131: expecting data or numeric expression.
        switch (ns-update
                ^
 Configuration file errors encountered -- exiting


I can not find anything on the net how this should be solved.
Is it a bug?


Version-Release number of selected component (if applicable):

dhcp-4.2.3-6.P2.fc16.i686



How reproducible: Always


Steps to Reproduce:
1. Put code like above in dhcpd.conf
2. Restart dhcpd.service
3.
  
Actual results:

 /etc/dhcp/dhcpd.conf line 131: expecting data or numeric expression.
        switch (ns-update
                ^
 Configuration file errors encountered -- exiting




Expected results:


No such error


Additional info:
Comment 1 Jiri Popelka 2012-02-01 04:23:12 EST
I don't want to sound harsh, but you know that this is more a question that bug report and therefore should be asked on dhcp-users@lists.isc.org and not here.
You'll get a more sophisticated answers there cause I'm just a devel and not skilled dhcp user/admin.
Comment 2 Eddie Lania 2012-02-02 07:39:12 EST
I asked on dhcp-users@lists.isc.org and have got no answer.
How do you know for sure it's a question and not a bug?
Comment 3 Jiri Popelka 2012-02-04 02:43:06 EST
Closing per
https://lists.isc.org/pipermail/dhcp-users/2012-February/014501.html
There's nothing I can do for you here, sorry.

Note You need to log in before you can comment on or make changes to this bug.