VLAN subinterfaces, bridges and udev
Subsystems (2)
[Please Cc me, I am not subscribed to netdev.]
Can I rely on the presence of the $DEVPATH/driver symlink (e.g. /sys/class/net/eth0/driver) to check if a network interface is a "real" device insteaf of a VLAN or a bridge?
----- Forwarded message from Marco d'Itri <[email protected]> -----
To: [email protected]
Subject: VLAN subinterfaces
From: Marco d'Itri <[email protected]>
I wrote a script to handle persistent rules for network interfaces, but I noticed that VLAN subinterfaces have the same MAC address of the parent interface and I could not find in sysfs anything evident which I could use in a rule. The only difference I noticed is that the VLAN subinterfaces lack the device and drivers symlinks.
This problem affects anybody using VLANs, is there a good solution?
Signature · 9 lines
ciao, Marco ----- End forwarded message ----- ----- Forwarded message from Marco d'Itri <[email protected]> ----- To: [email protected] Subject: Re: VLAN subinterfaces From: Marco d'Itri <[email protected]>
Quoted 6 lines · Marco d'Itri
I wrote a script to handle persistent rules for network interfaces, but I noticed that VLAN subinterfaces have the same MAC address of the parent interface and I could not find in sysfs anything evident which I could use in a rule. The only difference I noticed is that the VLAN subinterfaces lack the device and drivers symlinks.
This problem affects anybody using VLANs, is there a good solution?
Another user (Debian bug #365248) reported that this applies to bridges too. Is adding DRIVER=="?*" to the rules the correct workaround?
Signature · 19 lines
ciao, Marco ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel ----- End forwarded message ----- -- ciao, Marco
Quoted 5 lines · Marco d'Itri
[Please Cc me, I am not subscribed to netdev.]
Can I rely on the presence of the $DEVPATH/driver symlink (e.g.
/sys/class/net/eth0/driver) to check if a network interface is a "real" device insteaf of a VLAN or a bridge?
To distinguish I use a VLAN specific IOCTL (GET_VLAN_REALDEV_NAME_CMD). If that IOCTL has no error, then it is a VLAN.
I don't know if there is a similar trick for bridges.
Thanks,
Ben
Signature · 2 lines
Ben Greear <[email protected]> Candela Technologies Inc http://www.candelatech.com
Quoted 5 lines · Ben Greear
Quoted 3 lines
Can I rely on the presence of the $DEVPATH/driver symlink (e.g.
/sys/class/net/eth0/driver) to check if a network interface is a "real" device insteaf of a VLAN or a bridge?To distinguish I use a VLAN specific IOCTL (
GET_VLAN_REALDEV_NAME_CMD). If that IOCTL has no error, then it is a VLAN.
This is not useful for udev, it needs something available in sysfs.
Signature · 2 lines
ciao, Marco