Blob Blame History Raw
From d5eaacc6ef749346cc83d6f142e28e0ae15a2623 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Tue, 20 Jun 2017 15:40:51 +0200
Subject: [PATCH] network: Simplify the ignored Network interface types

We might want to add more ignored types later on, but this is a simple
cleanup.

https://bugzilla.gnome.org/show_bug.cgi?id=783998
---
 panels/network/cc-network-panel.c | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/panels/network/cc-network-panel.c b/panels/network/cc-network-panel.c
index 0a29c927f..5eca8429e 100644
--- a/panels/network/cc-network-panel.c
+++ b/panels/network/cc-network-panel.c
@@ -696,19 +696,12 @@ panel_add_device (CcNetworkPanel *panel, NMDevice *device)
         if (find_in_model_by_id (panel, udi, NULL) != NULL)
                 goto out;
 
-        /* Don't add the libvirtd bridge to the UI */
-        if (g_strrstr (udi, "/virbr0") != NULL)
-                goto out;
-        /* Don't add VPN devices either */
-        if (g_strrstr (udi, "/tun0") != NULL)
-                goto out;
-
         type = nm_device_get_device_type (device);
 
         g_debug ("device %s type %i path %s",
                  udi, type, nm_object_get_path (NM_OBJECT (device)));
 
-        /* map the NMDeviceType to the GType */
+        /* map the NMDeviceType to the GType, or ignore */
         switch (type) {
         case NM_DEVICE_TYPE_ETHERNET:
                 device_g_type = NET_TYPE_DEVICE_ETHERNET;
@@ -719,6 +712,16 @@ panel_add_device (CcNetworkPanel *panel, NMDevice *device)
         case NM_DEVICE_TYPE_WIFI:
                 device_g_type = NET_TYPE_DEVICE_WIFI;
                 break;
+        /* not going to set up a cluster in GNOME */
+        case NM_DEVICE_TYPE_VETH:
+        /* enterprise features */
+        case NM_DEVICE_TYPE_BOND:
+        case NM_DEVICE_TYPE_TEAM:
+        /* Don't need the libvirtd bridge */
+        case NM_DEVICE_TYPE_BRIDGE:
+        /* Don't add VPN devices */
+        case NM_DEVICE_TYPE_TUN:
+                goto out;
         default:
                 device_g_type = NET_TYPE_DEVICE_SIMPLE;
                 break;
-- 
2.13.0