Package: udev
Version: 0.141-2
Severity: important
Tags: patch
When a tun/tap device is added, /lib/udev/net.agent ignores the event, and the
appropriate configuration line in
/etc/network/interface is not executed. Line 70 of net.agent says "these
interfaces generate hotplug events *after*
they are brought up", however at least in respect of tun/tap devices,
investigation shows that this is not true.
If tun & tap are removed from the list in the following 'case:' statement,
things start working.
To duplicate this bug, you will need 2 machines:
On machine 1, ensure the following is in /etc/network/interfaces
# Tunnel interface
allow-hotplug tun0
iface tun0 inet static
address 192.168.2.2
netmask 255.255.255.0
Now on machine 2 (as root)
machine2# ssh -w any r...@machine1.
Password: [enter password]
On machine 1 (as root):
machine1# ifconfig -a
You will notice tun0 is not configured with the IP address given.
An 'strace -fp' of udevd shows that net.agent is being exected with the
'add' in $ACTION and 'tun0'
in $INTERFACE as expected.
If the above instructions are repeated with the attached patch applied, the
tun0 device IP address is correctly
applied.
-- Package-specific info:
-- /etc/udev/rules.d/:
/etc/udev/rules.d/:
total 8
-rw-r--r-- 1 root root 531 2008-04-03 16:58 70-persistent-cd.rules
-rw-r--r-- 1 root root 374 2009-09-18 13:21 70-persistent-net.rules
-- /sys/:
/sys/block/dm-0/dev
/sys/block/dm-1/dev
/sys/block/hda/dev
/sys/block/hda/hda1/dev
/sys/block/hda/hda2/dev
/sys/block/hda/hda5/dev
/sys/block/loop0/dev
/sys/block/loop1/dev
/sys/block/loop2/dev
/sys/block/loop3/dev
/sys/block/loop4/dev
/sys/block/loop5/dev
/sys/block/loop6/dev
/sys/block/loop7/dev
/sys/block/ram0/dev
/sys/block/ram10/dev
/sys/block/ram11/dev
/sys/block/ram12/dev
/sys/block/ram13/dev
/sys/block/ram14/dev
/sys/block/ram15/dev
/sys/block/ram1/dev
/sys/block/ram2/dev
/sys/block/ram3/dev
/sys/block/ram4/dev
/sys/block/ram5/dev
/sys/block/ram6/dev
/sys/block/ram7/dev
/sys/block/ram8/dev
/sys/block/ram9/dev
/sys/class/input/input0/event0/dev
/sys/class/input/input1/event1/dev
/sys/class/input/input1/mouse0/dev
/sys/class/input/input1/ts0/dev
/sys/class/input/input2/event2/dev
/sys/class/input/input3/event3/dev
/sys/class/input/input3/mouse1/dev
/sys/class/input/input3/ts1/dev
/sys/class/input/mice/dev
/sys/class/misc/device-mapper/dev
/sys/class/misc/hpet/dev
/sys/class/misc/mcelog/dev
/sys/class/misc/psaux/dev
/sys/class/misc/rtc/dev
/sys/class/misc/snapshot/dev
/sys/class/misc/tun/dev
/sys/class/usb_device/usbdev1.1/dev
/sys/class/usb_device/usbdev1.2/dev
/sys/devices/pci0000:00/0000:00:01.2/usb1/1-0:1.0/usbdev1.1_ep81/dev
/sys/devices/pci0000:00/0000:00:01.2/usb1/1-2/1-2:1.0/usbdev1.2_ep81/dev
/sys/devices/pci0000:00/0000:00:01.2/usb1/1-2/usbdev1.2_ep00/dev
/sys/devices/pci0000:00/0000:00:01.2/usb1/usbdev1.1_ep00/dev
-- Kernel configuration:
isapnp_init not present.
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.18-6-amd64 (SMP w/1 CPU core)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages udev depends on:
ii debconf [debconf-2.0] 1.5.27 Debian configuration management sy
ii libc6 2.9-25 GNU C Library: Shared libraries
ii libselinux1 2.0.85-4 SELinux runtime shared libraries
ii libvolume-id1 0.141-2 libvolume_id shared library
ii lsb-base 3.2-23 Linux Standard Base 3.2 init scrip
udev recommends no packages.
udev suggests no packages.
-- debconf information excluded
--- /lib/udev/net.agent.keep.20090922 2009-08-16 20:14:46.000000000 +0100
+++ /lib/udev/net.agent 2009-09-22 09:34:00.000000000 +0100
@@ -69,7 +69,7 @@
add)
# these interfaces generate hotplug events *after* they are brought up
case $INTERFACE in
- ppp*|ippp*|isdn*|plip*|lo*|irda*|ipsec*|tun*|tap*)
+ ppp*|ippp*|isdn*|plip*|lo*|irda*|ipsec*)
exit 0 ;;
esac