[Pkg-utopia-maintainers] Bug#419796: makes ifdown take ten seconds more if openvpn is running

Joey Hess joeyh at debian.org
Tue Apr 17 23:56:58 UTC 2007


Package: avahi-daemon
Version: 0.6.17-3
Severity: normal
File: /usr/lib/avahi/avahi-daemon-check-dns.sh

If openvpn is running, this script makes ifdown take ten additional
seconds to run. I'd like ifdown to run as fast as possible, since it's
annoying to wait for it when moving between networks or suspending a
machine.

The part that's hanging is the "host -t soa local." Apparently the code
just before that, which tries to determine if there is a global IP address,
sees my vpn as one, even though the vpn is actually dead due to the wireless
having just been taken down.

root at kodama:~>route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.42.0.1       0.0.0.0         255.255.255.255 UH    0      0        0 tun0
10.42.0.0       10.42.0.1       255.255.255.0   UG    0      0        0 tun0
root at kodama:~>ADDRS=$(LC_ALL=C ifconfig | grep ' addr:')
root at kodama:~>echo "${ADDRS}" | egrep -v ':127|Scope:Host|Scope:Link'
          inet addr:10.42.0.13  P-t-P:10.42.0.1  Mask:255.255.255.255

There's probably no good way to differentiate between this vpn and one
that might use .local and still be active, and I don't suggest you do so.

Instead, consider:

1. The only reason this script needs to run when an interface is taken
   down is to restart avahi if avahi was disabled due to .local in the dns
   when the the interface was brought up.
2. If that's the case, then /var/run/avahi-daemon/disabled-for-unicast-local
   should already exist, created by this script when the interface came
   up.
3. So if it doesn't exist, the script doesn't need to do anything else
   when the interface is taken down. Just test for the file and exit if
   it's not there.

-- 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-daemon depends on:
ii  adduser                       3.102      Add and remove users and groups
ii  dbus                          1.0.2-2    simple interprocess messaging syst
ii  libavahi-common3              0.6.17-3   Avahi common library
ii  libavahi-core5                0.6.17-3   Avahi's embeddable mDNS/DNS-SD lib
ii  libc6                         2.5-1      GNU C Library: Shared libraries
ii  libcap1                       1:1.10-14  support for getting/setting POSIX.
ii  libdaemon0                    0.10-1     lightweight C library for daemons
ii  libdbus-1-3                   1.0.2-2    simple interprocess messaging syst
ii  libexpat1                     1.95.8-3.4 XML parsing C library - runtime li

Versions of packages avahi-daemon recommends:
ii  libnss-mdns                   0.9-0.2    NSS module for Multicast DNS name 

-- 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/d9429c1d/attachment.pgp


More information about the Pkg-utopia-maintainers mailing list