Package: ifplugd
Version: 0.28-19
Severity: normal

Dear Maintainer,

I run ifplugd on my eth0 ethernet interface, and use wpa_supplicant for
my eth1 wireless interface.  When I am on wireless and plug in my
ethernet cable, I often (but not always) end up with a configured eth0
interface but no default route.  This happens due to a race condition
between eth1 going down and eth0 coming up.  I don't think this is
necesarily ifplugd's fault, but I file it here so you can help route it
to the right place.

Here is what happens:

1.  ifplugd detects the ethernet interface.
2.  ifplugd runs /etc/ifplugd/action.d/action_wpa.  This calls "wpa_cli
    -i eth1 disconnect", which takes down the eth1 interface asynchronously.
3.  ifplugd runs /etc/ifplugd/action.d/ifupdown.  This calls "ifup eth0",
    which brings up the eth0 interface using dhcp (in my configuration).
4.  When dhclient gets a lease, it calls /sbin/dhclient-script, which
    calls something like

      ip -4 route add default via 192.168.1.1 dev eth0

    Unfortunately, at this point, since eth1 was taken down
    asynchronously, it may still have the default route.  When this
    command is run while eth1 has the default route, it fails with

      RTNETLINK answers: File exists

I can think of three possible solutions:

- wpasupplicant provides a synchronous call to take down the interface.
- ifplugd polls for the wireless interfaces to finish going down.
- isc-dhcp-client enables setting multiple default routes, so eth0 and
  eth1 both have default routes for the brief period where they coexist.

The last of these seems most logical to me, but from what I understand
it may be difficult to configure.  Maybe isc-dhcp-client could take over
the default route unconditionally.

Anyhow, I would appreciate your advice.

Andrew

-- Package-specific info:
 /sys/class/net/ interfaces:
/sys/class/net/eth0/
/sys/class/net/eth1/
/sys/class/net/lo/

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

Kernel: Linux 3.0.0-1-486
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 ifplugd depends on:
ii  debconf [debconf-2.0]  1.5.41 
ii  libc6                  2.13-21
ii  libdaemon0             0.14-2 
ii  lsb-base               3.2-28 

Versions of packages ifplugd recommends:
ii  ifupdown  0.7~alpha5+really0.6.16

Versions of packages ifplugd suggests:
ii  wpasupplicant  0.7.3-5

-- debconf information:
* ifplugd/interfaces: eth0
* ifplugd/hotplug_interfaces:
* ifplugd/args: -f -u0 -d10 -w -I --no-beep
* ifplugd/suspend_action: stop



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to