[pkg-dhcp-devel] Bug#695810: isc-dhcp-client: exit-hooks not run when dhclient -1 option is used and fails

Patrick McNeil patrick at phidgets.com
Wed Dec 12 22:11:52 UTC 2012

Package: isc-dhcp-client
Version: 4.2.2.dfsg.1-5+deb70u2
Severity: important
Tags: patch

When dhclient -1 fails to get an address, it just exits, not calling the exit-
hooks. This prevents the avahi-autoipd exit-hook script from being run to 
assign a link-local address.

This bug has appeared long ago as: #486520 but was never applied.

In Debian Wheezy, ifupdown has been changed to call dhclient with the -1
option, so this issue is suddenly very relevent as the default state is 


diff -urNad dhcp-4.2.2.orig/client/dhclient.c dhcp-4.2.2/client/dhclient.c
--- dhcp-4.2.2.orig/client/dhclient.c	2011-07-01 05:58:53.000000000 -0600
+++ dhcp-4.2.2/client/dhclient.c	2012-12-12 14:51:21.000000000 -0700
@@ -2015,6 +2015,8 @@
 		if (!quiet)
 			log_info ("Unable to obtain a lease on first try.%s",
 				  "  Exiting.");
+		script_init (client, "FAIL", (struct string_list *)0);
+		script_go (client);
 		exit (2);

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: armel (armv5tejl)

Kernel: Linux 3.6.3 (PREEMPT)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
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-37
ii  libgcc1          1:4.7.2-4

isc-dhcp-client recommends no packages.

Versions of packages isc-dhcp-client suggests:
ii  avahi-autoipd  0.6.31-1
ii  resolvconf     1.67

-- Configuration Files:
/etc/dhcp/dhclient-exit-hooks.d/debug changed [not included]
/etc/dhcp/dhclient.conf changed [not included]

-- no debconf information

More information about the pkg-dhcp-devel mailing list