hald does not store information about vlan or bridge interfaces due to the lack of matching parent sysfs paths and "device" symlink. The udev event for a vlan iface coming up: UEVENT[1203328216.070578] add /devices/virtual/net/eth0.8 (net) ACTION=add DEVPATH=/devices/virtual/net/eth0.8 SUBSYSTEM=net INTERFACE=eth0.8 IFINDEX=18 SEQNUM=4778 UDEV [1203328216.071750] add /devices/virtual/net/eth0.8 (net) UDEV_LOG=3 ACTION=add DEVPATH=/devices/virtual/net/eth0.8 SUBSYSTEM=net INTERFACE=eth0.8 IFINDEX=18 SEQNUM=4778 UDEVD_EVENT=1 MATCHADDR=xx:xx:xx:yy:yy:yy MATCHIFTYPE=1 COMMENT=net device hald debug during event: 01:50:16.072 [I] osspec.c:230: SEQNUM=4778, ACTION=add, SUBSYSTEM=net, DEVPATH=/sys/devices/virtual/net/eth0.8, DEVNAME=, IFINDEX=18 01:50:16.072 [I] hotplug.c:142: /sys/devices/virtual/net/eth0.8 is a device (subsystem) 01:50:16.072 [I] device.c:3975: add_dev: subsys=net sysfs_path=/sys/devices/virtual/net/eth0.8 dev= parent_dev=0x00000000 Note the "parent_dev=0x00000000" part -- this causes net_add to immediately fail: if (parent_dev == NULL) goto error; I think a possible work-around for this (at least for vlan interfaces) would be to find the parent based on MAC address. This is arguable a problem with kernel sysfs tree: http://www.mail-archive.com/netdev@vger.kernel.org/msg11698.html Additionally, it would be very handy to have more debugging during hald device addition failures (see attachment).
Created attachment 14372 [details] [review] additional failure debugging
Also, it seems that using the "device" symlink is deprecated by the kernel, as documented in the Linux kernel's Documentation/sysfs-rules.txt file (e.g. "Assuming the existence of the "device"-link for a device in /sys/devices/ is a bug in the application.")
Created attachment 14390 [details] [review] additional device detection failure debugging Fixed debug patch to actually compile. ;)
Created attachment 14391 [details] [review] do not ignore virtual network devices This is a proposed patch to allow hal to see all network devices, including virtual ones. As done with other virtual devices, the parent is recorded as "/org/freedesktop/Hal/devices/computer".
Created attachment 14392 [details] [review] do not ignore virtual network devices Cleaned up patch -- using MAC address detection for parent-finding was simply wrong.
(In reply to comment #2) > Also, it seems that using the "device" symlink is deprecated by the kernel, as > documented in the Linux kernel's Documentation/sysfs-rules.txt file (e.g. > "Assuming the existence of the "device"-link for a device in /sys/devices/ is a > bug in the application.") And what prints: ls -alF /sys/class/net
$ ls -alF /sys/class/net total 0 drwxr-xr-x 2 root root 0 Feb 20 23:00 ./ drwxr-xr-x 38 root root 0 Feb 20 23:00 ../ lrwxrwxrwx 1 root root 0 Feb 20 23:00 br0 -> ../../devices/virtual/net/br0/ lrwxrwxrwx 1 root root 0 Feb 20 23:00 eth0 -> ../../devices/pci0000:00/0000:00:19.0/net/eth0/ lrwxrwxrwx 1 root root 0 Feb 20 23:00 eth0.10 -> ../../devices/virtual/net/eth0.10/ lrwxrwxrwx 1 root root 0 Feb 20 23:00 eth0.3 -> ../../devices/virtual/net/eth0.3/ lrwxrwxrwx 1 root root 0 Feb 20 23:00 lo -> ../../devices/virtual/net/lo/ lrwxrwxrwx 1 root root 0 Feb 20 23:00 vnet0 -> ../../devices/virtual/net/vnet0/
Note that this patch, as it stands, creates some additional work in existing clients that process the list of network interfaces (e.g. network-manager). They need to be adjusted to deal with virtual network interfaces too.
commit d4f1c6eb85ccb45d45641f30d6ea04dbb046fa28 Author: Danny Kukawka <danny.kukawka@web.de> Date: Mon Oct 20 15:18:26 2008 +0200 add support for virtual network devices Added support for virtual network devices as e.g. openvpn tunnel interfaces or loopback devices. Added new net subnamespace net.loopback for ARPHRD_LOOPBACK interfaces.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.