summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Bono <alessandro.bono369@gmail.com>2022-10-12 13:56:19 +0200
committerFelipe Borges <felipeborges@gnome.org>2022-10-12 14:46:59 +0200
commit608aac8fff9821894d154f99eaa8d24d4cf7b423 (patch)
tree93c65c73033b2e220ce91f9c91ba0de1183c4398
parent6f6fcb463cfdbb37d78b225d0b5c79f80357ef02 (diff)
downloadgnome-control-center-608aac8fff9821894d154f99eaa8d24d4cf7b423.tar.gz
net-device-ethernet: Don't check device iface name
If the interface name is wrong we shouldn't add the device in the first place. The device comes from NM. If the interface name is wrong is a bug at NM level.
-rw-r--r--panels/network/net-device-ethernet.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/panels/network/net-device-ethernet.c b/panels/network/net-device-ethernet.c
index efa98a637..373609d85 100644
--- a/panels/network/net-device-ethernet.c
+++ b/panels/network/net-device-ethernet.c
@@ -395,7 +395,6 @@ add_profile_button_clicked_cb (NetDeviceEthernet *self)
NMSettingConnection *sc;
g_autofree gchar *uuid = NULL;
g_autofree gchar *id = NULL;
- g_autoptr(GError) error = NULL;
NetConnectionEditor *editor;
const GPtrArray *connections;
const char *iface;
@@ -417,13 +416,9 @@ add_profile_button_clicked_cb (NetDeviceEthernet *self)
NULL);
iface = nm_device_get_iface (self->device);
- if (nm_utils_is_valid_iface_name (iface, &error)) {
- g_object_set (sc,
- NM_SETTING_CONNECTION_INTERFACE_NAME, iface,
- NULL);
- } else {
- g_warning ("Invalid interface Name '%s': %s", iface, error->message);
- }
+ g_object_set (sc,
+ NM_SETTING_CONNECTION_INTERFACE_NAME, iface,
+ NULL);
nm_connection_add_setting (connection, nm_setting_wired_new ());