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 762538 - [review] patch jk/device-types-bgo762538
[review] patch jk/device-types-bgo762538
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-02-23 15:16 UTC by Thomas Haller
Modified: 2016-02-23 22:20 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Thomas Haller 2016-02-23 15:16:31 UTC
An old patch from Jirka.

Orinally there was more. I rebased it and this what remains.
Comment 1 Beniamino Galvani 2016-02-23 15:53:34 UTC
> device: add new NMDeviceType NM_DEVICE_TYPE_VETH

I think this is right, veth devices should have their own type different
from TYPE_ETHERNET. But then we should also do this:

--- a/libnm/nm-device.c
+++ b/libnm/nm-device.c
@@ -341,6 +341,7 @@ static GType
 _nm_device_gtype_from_dtype (NMDeviceType dtype)
 {
        switch (dtype) {
+       case NM_DEVICE_TYPE_VETH:
	case NM_DEVICE_TYPE_ETHERNET:
                return NM_TYPE_DEVICE_ETHERNET;
	case NM_DEVICE_TYPE_WIFI:


to handle the new type in libnm or, better, implement in libnm a
NMDeviceVeth type.
Comment 2 Dan Williams 2016-02-23 16:19:28 UTC
Yeah, we'd have to do the gtype/dtype change too, otherwise we'd break backwards compat in the libraries.  At some point we should just add NMDeviceVeth to libnm though too...
Comment 3 Thomas Haller 2016-02-23 16:34:00 UTC
fixed && repushed.

Added another commit.
Comment 4 Beniamino Galvani 2016-02-23 21:30:11 UTC
(In reply to Thomas Haller from comment #3)
> fixed && repushed.
> 
> Added another commit.

> libnm: add missing device types to get_type_name()

+       case NM_DEVICE_TYPE_TUN:
+               return _("TUN");

Maybe "Tun", since it's not an acronym?
LGTM