udev /dev/net/tun bug
To reproduce:
cd /etc/hotplug
modprobe tun
udevstart
Result:
The following synthetic "net" hotplug event is received:
=======
DEVPATH=/class/misc/tun
UDEV_NO_SLEEP=1
ACTIONd
PWD=/etc/hotplug
DEVNAME=/dev/net/tun
SHLVL=2
INTERFACE=/dev/net/tun
_=/usr/bin/env
=======
This event is bogus, because there is really no interface, but a character device /dev/net/tun is involved. You may be interested in the following information:
udevinfo -a -p /class/misc/tun
device '/sys/class/misc/tun' has major:minor 10:200
looking at class device '/sys/class/misc/tun':
SYSFS{dev}="10:200"Signature · 12 lines
Alexander E. Patrakov ------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 9 lines · Alexander E. Patrakov
To reproduce:
cd
/etc/hotplug
modprobe tun
udevstartResult:
The following synthetic "net" hotplug event is received:
No, it's a real event.
Quoted 10 lines
DEVPATH=/class/misc/tun
UDEV_NO_SLEEP=1
ACTIONd
PWD=/etc/hotplug
DEVNAME=/dev/net/tun
SHLVL=2
INTERFACE=/dev/net/tun
_=/usr/bin/env
=======
Quoted 2 lines
This event is bogus, because there is really no interface, but a character device
/dev/net/tunis involved.
Exactly, that's why this event is important. Without it, udev would not be able to create the character device.
What is the issue you are having with this?
thanks,
greg k-h
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 4 lines · Greg KH
Exactly, that's why this event is important. Without it, udev would not be able to create the character device.
What is the issue you are having with this?
Agreed... I have 2.6.7 system here running udev-028 and OpenVPN, which uses /dev/net/tun to create tunnel interfaces, and it works just fine.
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 8 lines · Greg KH
Quoted 6 lines · Alexander E. Patrakov
To reproduce:
cd
/etc/hotplug
modprobe tun
udevstart
Quoted 5 lines
Quoted 3 lines
Result:
The following synthetic "net" hotplug event is received:
No, it's a real event.
Why do I re-receive that when I re-run udevstart? AFAIK just re-running udevstart doesn't produce any real hotplug events.
Quoted 10 lines
Quoted 10 lines
DEVPATH=/class/misc/tun
UDEV_NO_SLEEP=1
ACTIONd
PWD=/etc/hotplug
DEVNAME=/dev/net/tun
SHLVL=2
INTERFACE=/dev/net/tun
_=/usr/bin/env
=======
Quoted 7 lines
Quoted 2 lines
This event is bogus, because there is really no interface, but a character device
/dev/net/tunis involved.Exactly, that's why this event is important. Without it, udev would not be able to create the character device.
What is the issue you are having with this?
Yes, this is exactly the event due to which udev creates the /dev/net/tun character device :) However, it also gets dispatched to /etc/hotplug/net.agent for some reason.
Signature · 12 lines
Alexander E. Patrakov ------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 3 lines · Alexander E. Patrakov
Yes, this is exactly the event due to which udev creates the
/dev/net/tuncharacter device :) However, it also gets dispatched to/etc/hotplug/net.agentfor some reason.
It does so because of the "net" in the class path. No harm done.
thanks,
greg k-h
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel