netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* VLAN subinterfaces, bridges and udev
@ 2006-04-30 14:29 Marco d'Itri
  2006-05-01 16:02 ` Ben Greear
  0 siblings, 1 reply; 3+ messages in thread
From: Marco d'Itri @ 2006-04-30 14:29 UTC (permalink / raw)
  To: netdev

[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 <md@Linux.IT> -----

To: linux-hotplug-devel@lists.sourceforge.net
Subject: VLAN subinterfaces
From: Marco d'Itri <md@Linux.IT>

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?

-- 
ciao,
Marco

----- End forwarded message -----
----- Forwarded message from Marco d'Itri <md@Linux.IT> -----

To: linux-hotplug-devel@lists.sourceforge.net
Subject: Re: VLAN subinterfaces
From: Marco d'Itri <md@Linux.IT>

On Apr 23, Marco d'Itri <md@Linux.IT> wrote:

> 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?

-- 
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
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

----- End forwarded message -----

-- 
ciao,
Marco

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: VLAN subinterfaces, bridges and udev
  2006-04-30 14:29 VLAN subinterfaces, bridges and udev Marco d'Itri
@ 2006-05-01 16:02 ` Ben Greear
  2006-05-01 19:43   ` Marco d'Itri
  0 siblings, 1 reply; 3+ messages in thread
From: Ben Greear @ 2006-05-01 16:02 UTC (permalink / raw)
  To: netdev, md

Marco d'Itri wrote:
> [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


-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: VLAN subinterfaces, bridges and udev
  2006-05-01 16:02 ` Ben Greear
@ 2006-05-01 19:43   ` Marco d'Itri
  0 siblings, 0 replies; 3+ messages in thread
From: Marco d'Itri @ 2006-05-01 19:43 UTC (permalink / raw)
  To: Ben Greear; +Cc: netdev

On May 01, Ben Greear <greearb@candelatech.com> wrote:

> >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.

-- 
ciao,
Marco

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-05-01 19:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-30 14:29 VLAN subinterfaces, bridges and udev Marco d'Itri
2006-05-01 16:02 ` Ben Greear
2006-05-01 19:43   ` Marco d'Itri

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).