After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 700822 - Add support for veth devices (for containers and testing)
Add support for veth devices (for containers and testing)
Status: RESOLVED DUPLICATE of bug 687254
Product: NetworkManager
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-05-22 08:40 UTC by Martin Pitt
Modified: 2013-05-22 12:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add support for veth virtual ethernet devices. (2.96 KB, patch)
2013-05-22 08:46 UTC, Martin Pitt
none Details | Review

Description Martin Pitt 2013-05-22 08:40:02 UTC
In LXC containers, chroots, or similar virtualization setups, one typically creates veth devices to communicate with/route through the host. These are create pairwise, one end for the container (usually called "ethN"), the other end for the host (usually called "vethN"):

  # ip link add name eth1 type veth peer name veth0

This creates a veth0/eth1 veth pair. As these have no driver, NM classifies these as "generic" devices:

DEVICE     TYPE              STATE        
eth1       unknown           unmanaged    
veth0      unknown           unmanaged    

In order to use NM in containers with these devices, we need to teach it (in particular, nm-udev-manager.c's dev_get_attrs() and nm-system.c's nm_system_get_iface_type()) to recognize veth devices, and then filter out ones which are called "veth.." (as these are usually for the "host" side).

This also makes it possible to create automatic tests for ethernet (my current ones use veth devices as well, to be independent of any physical devices).
Comment 1 Martin Pitt 2013-05-22 08:46:26 UTC
Created attachment 245019 [details] [review]
Add support for veth virtual ethernet devices.

Original patch by Stéphane Graber, I updated it for current git master. I have integration tests covering this, and Ubuntu has had this patch applied for about a year now.
Comment 2 Dan Winship 2013-05-22 11:36:25 UTC
I'm going to dup this to 687254 since there's already more discussion there

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