CC: | 486535-forwarded@bugs.debian.org, martin.pitt@ubuntu.com |
Subject: | [martin.pitt@ubuntu.com: Bug#486520: dhcp3-client: Call dhclient-script FAIL in single-shot mode] |
Date: | Tue, 17 Jun 2008 14:32:39 +1000 |
To: | dhcp-bugs@isc.org |
From: | Andrew Pollock <apollock@debian.org> |
Hello,
This bug report was received today, with a patch. Ubuntu is already carrying
this feature. You might like to consider adding it to a future point release
if it qualifies, or a future feature release if it does not.
Please maintain the Cc on any followup correspondence to keep our BTS in the
loop.
regards
Andrew
----- Forwarded message from Martin Pitt <martin.pitt@ubuntu.com> -----
From: Martin Pitt <martin.pitt@ubuntu.com>
To: Debian BTS Submit <submit@bugs.debian.org>
Subject: Bug#486520: dhcp3-client: Call dhclient-script FAIL in single-shot mode
Date: Mon, 16 Jun 2008 17:58:40 +0200
User-Agent: Mutt/1.5.17+20080114 (2008-01-14)
Package: dhcp3-client
Version: 3.1.1-1
Tags: patch
User: ubuntu-devel@lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch intrepid
When "dhclient -1" fails to get an address, it does not call
dhclient-script FAIL as it does without -1. This breaks e. g. the
avahi-autoipd invocation in this mode (which dhcdbd uses by default).
Attached patch was applied in Ubuntu a while ago, and it fixes the
bug. Now avahi-autoipd assigns an IPv4LL address for timed out DHCP
requests correctly.
Thanks,
Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
#! /bin/sh /usr/share/dpatch/dpatch-run
## dhclient-onetry-call-clientscript.dpatch by Martin Pitt <martin.pitt@ubuntu.com>
##
## DP: Call 'dhclient-script FAIL' when failing to get an address also when
## DP: operating in oneshot mode (-1). This fixes avahi-autoipd invocation
## DP: through dhcdbd.
@DPATCH@
diff -urNad dhcp3-3.0.4~/client/dhclient.c dhcp3-3.0.4/client/dhclient.c
--- dhcp3-3.0.4~/client/dhclient.c 2006-12-01 14:18:30.000000000 +0100
+++ dhcp3-3.0.4/client/dhclient.c 2006-12-01 14:18:45.000000000 +0100
@@ -1556,6 +1556,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);
}
----- End forwarded message -----
Message body not shown because it is not plain text.