[pkg-dhcp-devel] Bug#885973: isc-dhcp-server: provide way for dhcp-eval to rewrite invalid DHCP client hostnames for DDNS

Nye Liu nyet at nyet.org
Mon Jan 1 03:42:39 UTC 2018

Package: isc-dhcp-server
Version: 4.3.5-3+b2
Severity: wishlist
Tags: upstream

DHCP clients often send hostnames with characters not allowed in DNS such as

dhcp-eval should provide a way to rewrite those via hardcoded mechanism (e.g
translate all invalid characters to '-'), or patsubst/regex, or even by
evaluating stdout of execute()

Currently, the only option is something like this:

  if not (option host-name ~~ "^[a-z0-9][a-z0-9\-]+[a-z0-9]$") {
      set new_host-name = concat("host-", binary-to-ascii(16, 8, "", substring(hardware, 1, 6)));
      log(concat("invalid hostname: ", option host-name, " => ", new_host-name));
      ddns-hostname = new_host-name;

which obscures the real DHCP hostname completely.

-- System Information:
Debian Release: buster/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'testing-debug'), (500, 'unstable'), (1, 'experimental-debug')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.14.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages isc-dhcp-server depends on:
ii  debconf [debconf-2.0]  1.5.65
ii  debianutils            4.8.3
ii  libc6                  2.25-5
ii  libdns-export169       1:9.11.2+dfsg-5
ii  libirs-export160       1:9.11.2+dfsg-5
ii  libisc-export166       1:9.11.2+dfsg-5
ii  lsb-base               9.20170808

Versions of packages isc-dhcp-server recommends:
ii  isc-dhcp-common  4.3.5-3+b2
ii  policycoreutils  2.7-1

Versions of packages isc-dhcp-server suggests:
pn  isc-dhcp-server-ldap  <none>
ii  policykit-1           0.105-18

-- Configuration Files:
/etc/dhcp/dhcpd.conf changed [not included]

-- debconf information excluded

More information about the pkg-dhcp-devel mailing list