[pkg-dhcp-devel] Bug#588290: dhcp-eval: hardware operator does not work

Martin von Wittich martin.von.wittich at iserv.eu
Tue Jul 6 22:00:16 UTC 2010


Package: dhcp3-server
Version: 3.1.1-6+lenny4
Severity: normal

I'm trying to write a script that puts all leases assigned by the DHCP server
into a database. My dhcpd config looks like this (minimal example):

-----------------------------------------------------------------------
ddns-update-style none;
default-lease-time 600;
max-lease-time 7200;

subnet 192.168.90.0 netmask 255.255.255.0 {
  range 192.168.90.200 192.168.90.210;

  on commit {
    log(hardware);
    set ip = binary-to-ascii(10, 8, ".", leased-address);
    set mac = binary-to-ascii(16, 8, ":", substring(hardware, 1, 6));
    execute("/root/Martin/dhcp", "commit", ip, "mac", mac);
  }
}
-----------------------------------------------------------------------

But when trying to start the DHCP server, I get the following error message:

dhcpd.conf.test line 12: Bogus number mac: digit 22 not in base 16
    execute("/root/Martin.(nobackup)/dhcp", "commit", ip, "mac", mac)
                                                                 ^
Configuration file errors encountered -- exiting


When I now disable the last 3 commands in the on commit block, dhcpd works, but
apperantly the hardware operator does not return any useful info when it is
logged:

Jul  6 23:47:18 iserv dhcpd: #001

This does not fit the description from man dhcp-eval:

> The hardware operator returns a data string whose first element is the type
> of network interface indicated  in  packet  being  considered,  and whose
> subsequent elements are client’s link-layer address.

-- System Information:
Debian Release: 5.0.5
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (x86_64)

Kernel: Linux 2.6.26-1-xen-amd64 (SMP w/1 CPU core)
Locale: LANG=de_DE.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages dhcp3-server depends on:
ii  debconf [debconf-2.0]     1.5.24         Debian configuration management sy
ii  debianutils               2.30           Miscellaneous utilities specific t
ii  dhcp3-common              3.1.1-6+lenny4 common files used by all the dhcp3
ii  libc6                     2.7-18lenny4   GNU C Library: Shared libraries
ii  lsb-base                  3.2-20         Linux Standard Base 3.2 init scrip

dhcp3-server recommends no packages.

Versions of packages dhcp3-server suggests:
pn  dhcp3-server-ldap             <none>     (no description available)

-- debconf information:
* dhcp3-server/new_auth_behavior:
* dhcp3-server/interfaces: eth0
  dhcp3-server/new_next-server_behaviour:
  dhcp3-server/config_warn:





More information about the pkg-dhcp-devel mailing list