Package: ifupdown
Version: 0.6.8
Severity: normal
Tags: patch

While dhclient is started with the -e option to fail and exit when no
leases could be acquired, dhclient3 is not. As a result, the interface
comes up unconfigured in that case.

The changelog states that the -1 option of dhclient3 is not used,
because dhclient3 would not daemonize at all:

--8<---
      + Avoids inconsistency in interface state if the command run
       by ifup fails, also added -e option to dhclient in order to
       have it return an error if it cannot get an address.
       Notice that this is not yet done with dhclient3 (-1) since that would
       mean not running dhclient3 as a daemon and renews not being done.
       (Closes: #97782, #82339, #113338, #148666, #169194)
--8<---

However, both looking at the source and trying it using the attached
patch shows that -1 in dhclient3 is implemented nearly identical to -e
in dhclient and that dhclient3 with the -1 option does daemonize and
renew its lease fine when it did acquire one in the first place (and
fail otherwise).

elmar

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: powerpc (ppc)

Kernel: Linux 2.6.20
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages ifupdown depends on:
ii  debconf [debconf-2.0]         1.5.13     Debian configuration management sy
ii  libc6                         2.5-1      GNU C Library: Shared libraries
ii  lsb-base                      3.1-23.1   Linux Standard Base 3.1 init scrip
ii  net-tools                     1.60-17    The NET-3 networking toolkit

ifupdown recommends no packages.

-- debconf information:
  ifupdown/convert-interfaces: true

-- 

 .'"`.                                                            /"\
| :' :   Elmar Hoffmann <[EMAIL PROTECTED]>    ASCII Ribbon Campaign  \ /
`. `'    GPG key available via pgp.net        against HTML email   X
  `-                                                    & vCards  / \
--- ifupdown-0.6.8.orig/ifupdown.nw	2006-09-28 19:12:18.000000000 +0200
+++ ifupdown-0.6.8/ifupdown.nw	2007-04-21 01:28:53.000000000 +0200
@@ -3965,7 +3965,7 @@
 
   up
     [[ifconfig %iface% hw %hwaddress%]]
-    dhclient3 -pf /var/run/dhclient.%iface%.pid -lf /var/lib/dhcp3/dhclient.%iface%.leases %iface% \
+    dhclient3 -1 -pf /var/run/dhclient.%iface%.pid -lf /var/lib/dhcp3/dhclient.%iface%.leases %iface% \
         if (execable("/sbin/dhclient3"))
     dhclient -e -pf /var/run/dhclient.%iface%.pid -lf /var/lib/dhcp/dhclient.%iface%.leases %iface% \
         elsif (execable("/sbin/dhclient"))

Attachment: signature.asc
Description: Digital signature

Reply via email to