summary refs log tree commit diff
path: root/src/libnm-core-impl/nm-setting-bond-port.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2022-10-18 11:56:48 +0200
committerMichael Biebl <biebl@debian.org>2022-10-18 11:56:48 +0200
commit9f101839d9e64df832e9e43c5181887369c46a7e (patch)
tree3e23589a9d4e9e7c32ce41b634ccf26af3f0d45e /src/libnm-core-impl/nm-setting-bond-port.c
parentab0efddcdb48d800e2f938da54cfe3074640792e (diff)
New upstream version 1.40.2 upstream/1.40.2
Diffstat (limited to 'src/libnm-core-impl/nm-setting-bond-port.c')
-rw-r--r--src/libnm-core-impl/nm-setting-bond-port.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libnm-core-impl/nm-setting-bond-port.c b/src/libnm-core-impl/nm-setting-bond-port.c
index 9b41a74f..7ea82a76 100644
--- a/src/libnm-core-impl/nm-setting-bond-port.c
+++ b/src/libnm-core-impl/nm-setting-bond-port.c
@@ -85,13 +85,15 @@ verify(NMSetting *setting, NMConnection *connection, GError **error)
         }
 
         slave_type = nm_setting_connection_get_slave_type(s_con);
-        if (!nm_streq0(slave_type, NM_SETTING_BOND_SETTING_NAME)) {
+        if (slave_type && !nm_streq(slave_type, NM_SETTING_BOND_SETTING_NAME)) {
             g_set_error(error,
                         NM_CONNECTION_ERROR,
                         NM_CONNECTION_ERROR_INVALID_PROPERTY,
-                        _("A connection with a '%s' setting must have the slave-type set to '%s'"),
+                        _("A connection with a '%s' setting must have the slave-type set to '%s'. "
+                          "Instead it is '%s'"),
                         NM_SETTING_BOND_PORT_SETTING_NAME,
-                        NM_SETTING_BOND_SETTING_NAME);
+                        NM_SETTING_BOND_SETTING_NAME,
+                        slave_type);
             g_prefix_error(error,
                            "%s.%s: ",
                            NM_SETTING_CONNECTION_SETTING_NAME,