[Pkg-utopia-maintainers] Bug#419794: makes ifdown sloow

Joey Hess joeyh at debian.org
Tue Apr 17 23:31:43 UTC 2007


Package: avahi-autoipd
Version: 0.6.17-3
Severity: normal
Tags: patch

With this package installed, ifdown wlan0 takes 10 seconds to run. 
This makes downing and upping dhcp when moving to a different network much
slower than it needs to be. I used to ifdown; ifup when resuming from sleep,
but that's impractical when the ifdown takes this long to run.

 ps shows:

27108 pts/3    S+     0:00          |           \_ ifdown wlan0
27134 pts/3    S+     0:00          |               \_ dhclient3 -r -pf /var/run/dhclient.wlan0.pid -lf /var/lib/dhcp3/dhclient.wlan0.leases wlan0
27135 pts/3    S+     0:00          |                   \_ /bin/bash /sbin/dhclient-script
27140 pts/3    S+     0:00          |                       \_ /usr/sbin/avahi-autoipd -wD wlan0

AFAIK this hook is only useful if dhclient failed to receive an address,
not when the link is being taken down.

According to the dhclient-script man page, the $exit_status variable
should be passed to the dhclient-exit-hooks script. However, in my
testing, zzz_avahi-autoipd does not see that. The man page also
documents though that the hooks will be run with RELEASE if the admin
wants it to drop its lease. So this patch will avoid the delay:

--- zzz_avahi-autoipd~	2007-04-17 19:31:11.000000000 -0400
+++ zzz_avahi-autoipd	2007-04-17 19:30:55.000000000 -0400
@@ -23,11 +23,11 @@
     MEDIUM|ARPCHECK|ARPSEND|NBI)
         ;;
 
-    PREINIT|BOUND|RENEW|REBIND|REBOOT|STOP)
+    PREINIT|BOUND|RENEW|REBIND|REBOOT|STOP|RELEASE)
         # Stopping avahi-autoipd is left for the enter hook
         ;;
     
-    EXPIRE|RELEASE|FAIL|TIMEOUT)
+    EXPIRE|FAIL|TIMEOUT)
         /usr/sbin/avahi-autoipd -wD $interface 2> /dev/null
         ;;
 esac

With that patch, ifdown takes less than 1 second.

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.18-4-686 (SMP w/1 CPU core)
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 avahi-autoipd depends on:
ii  adduser                       3.102      Add and remove users and groups
ii  libc6                         2.5-1      GNU C Library: Shared libraries
ii  libdaemon0                    0.10-1     lightweight C library for daemons

Versions of packages avahi-autoipd recommends:
ii  dhcp3-client                  3.0.4-14   DHCP Client
ii  iproute                       20061002-4 Professional tools to control the 

-- no debconf information

-- 
see shy jo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-utopia-maintainers/attachments/20070417/d7d176c7/attachment.pgp


More information about the Pkg-utopia-maintainers mailing list