Package: isc-dhcp-client Version: 4.2.4-3 Severity: important Tags: patch Hi,
dhclient-script.kfreebsd refers to undefined variables $metric_arg and $alias_subnet_arg iwhich should be replaced by their 'alternate value expansion' equivalents: * $metric_arg -> ${IF_METRIC:+metric $IF_METRIC} * $alias_subnet_arg -> ${alias_subnet_mask:+netmask $alias_subnet_mask} These variables are oversights/remnants from previous changes. The attached patch should fix the issue. Thanks for maintaining isc-dhcp in Debian Peter -- System Information: Debian Release: wheezy/sid APT prefers testing APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 3.2.0-3-amd64 (SMP w/4 CPU cores) Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages isc-dhcp-client depends on: ii debianutils 4.3.2 ii iproute 20120521-3 ii isc-dhcp-common 4.2.2.dfsg.1-5+deb70u2 ii libc6 2.13-35 isc-dhcp-client recommends no packages. Versions of packages isc-dhcp-client suggests: pn avahi-autoipd <none> pn resolvconf <none> -- Configuration Files: /etc/dhcp/dhclient.conf changed [not included] -- no debconf information
>From b628d26b45ac88e96e5ce019b09a37f07df0e61e Mon Sep 17 00:00:00 2001 From: Peter Marschall <pe...@adpm.de> Date: Sun, 21 Oct 2012 13:18:21 +0200 Subject: [PATCH 2/2] dhclient-script.kfreebsd: fix undefined $metric_arg and $alias_subnet_arg Replace $metric_arg and $alias_subnet_arg by their 'alternate value expansion' equivalents: * $metric_arg -> ${IF_METRIC:+metric $IF_METRIC} * $alias_subnet_arg -> ${alias_subnet_mask:+netmask $alias_subnet_mask} It looks as if this regression has been introduced in ed89ff46c4032bc80d8bf25f7990121be6bd8570 and only partially fixed in 1a169bc2929ef9ba449cca80b271084d1b29f201. Signed-off-by: Peter Marschall <pe...@adpm.de> --- debian/dhclient-script.kfreebsd | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/debian/dhclient-script.kfreebsd b/debian/dhclient-script.kfreebsd index abd0e78..54cc9de 100644 --- a/debian/dhclient-script.kfreebsd +++ b/debian/dhclient-script.kfreebsd @@ -173,9 +173,9 @@ case "$reason" in if [ -z "$old_ip_address" ] || [ "$old_ip_address" != "$new_ip_address" ] || [ "$reason" = "BOUND" ] || [ "$reason" = "REBOOT" ]; then - # FIXME: metric_arg is not defined ifconfig $interface inet $new_ip_address ${new_subnet_mask:+netmask $new_subnet_mask} \ - ${new_broadcast_address:+broadcast $new_broadcast_address} $mtu_arg $metric_arg $medium + ${new_broadcast_address:+broadcast $new_broadcast_address} \ + $mtu_arg ${IF_METRIC:+metric $IF_METRIC} $medium route add $new_ip_address 127.1 >/dev/null 2>&1 for router in $new_routers; do # If the subnet is captive, eg the netmask is /32 but the default @@ -250,8 +250,7 @@ case "$reason" in fi if [ -n "$alias_ip_address" ]; then - # FIXME: alias_subnet_arg is not defined - ifconfig $interface inet alias $alias_ip_address $alias_subnet_arg + ifconfig $interface inet alias $alias_ip_address ${alias_subnet_mask:+netmask $alias_subnet_mask} route add $alias_ip_address 127.0.0.1 fi @@ -263,9 +262,9 @@ case "$reason" in route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1 fi - # FIXME: metric_arg is not defined ifconfig $interface inet $new_ip_address ${new_subnet_mask:+netmask $new_subnet_mask} \ - ${new_broadcast_address:+broadcast $new_broadcast_address} $mtu_arg $metric_arg $medium + ${new_broadcast_address:+broadcast $new_broadcast_address} \ + $mtu_arg ${IF_METRIC:+metric $IF_METRIC} $medium sleep 1 @@ -274,8 +273,7 @@ case "$reason" in if ping -q -c 1 $1; then if [ x$new_ip_address != x$alias_ip_address ] && \ [ x$alias_ip_address != x ]; then - # FIXME: alias_subnet_arg is not defined - ifconfig $interface inet alias $alias_ip_address $alias_subnet_arg + ifconfig $interface inet alias $alias_ip_address ${alias_subnet_mask:+netmask $alias_subnet_mask} route add $alias_ip_address 127.0.0.1 fi route add $new_ip_address 127.1 >/dev/null 2>&1 -- 1.7.10.4