Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 811291

Summary: net-misc/networkmanager-1.32.4: udev rule for setting ENV{ID_NET_DRIVER} does not work for veth devices
Product: Gentoo Linux Reporter: Stephen Bosch <posting>
Component: Current packagesAssignee: Gentoo Linux Gnome Desktop Team <gnome>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=714168
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info

Description Stephen Bosch 2021-08-31 20:38:39 UTC
/lib/udev/rules.d/85-nm-unmanaged.rules contains the lines

# Virtual Ethernet device pair. Often used to communicate with a peer interface
# in another net namespace and managed by libvirt, Docker or the like.
ENV{ID_NET_DRIVER}=="veth", ENV{NM_UNMANAGED}="1"

But on my system running eudev, the ID_NET_DRIVER variable is not set. Here's the udevadm output for a veth device:

# udevadm info /sys/devices/virtual/net/veth9f54ce0a
calling: info
P: /devices/virtual/net/veth9f54ce0a
E: DEVPATH=/devices/virtual/net/veth9f54ce0a
E: ID_MM_CANDIDATE=1
E: IFINDEX=12
E: INTERFACE=veth9f54ce0a
E: SUBSYSTEM=net
E: USEC_INITIALIZED=11188430


Reproducible: Always

Steps to Reproduce:
1. Install networkmanager.
2. Install docker or lxd and create a container.
3. Check to see if the virtual ethernet interfaces are managed.
Actual Results:  
In practice, the interfaces are not recognized by eudev using the default rules and NM_UNMANAGED is not set.

Expected Results:  
The interfaces should be recognized as virtual ethernet interfaces and NM_UNMANAGED set accordingly.
Comment 1 Stephen Bosch 2021-08-31 20:39:59 UTC
Created attachment 736987 [details]
emerge --info
Comment 2 Stephen Bosch 2021-08-31 20:47:18 UTC
If I use the workaround described in https://bugs.gentoo.org/714168#c2, NM_UNMANAGED is properly set for the affected interfaces.

This should be fixed in the ebuild.
Comment 3 Matt Turner gentoo-dev 2022-05-18 02:55:21 UTC
In the v1.38.0 NEWS file I see

> * Veth devices with name "eth*" are now managed by default via the
>   udev rule. This is to support managing the network in LXD containers.

Does this resolve the issue?
Comment 4 Stephen Bosch 2023-04-28 08:08:19 UTC
I think this is a duplicate of https://bugs.gentoo.org/714168.

*** This bug has been marked as a duplicate of bug 714168 ***