about summary refs log tree commit diff
path: root/src/libnm-core-impl/nm-setting-bond-port.c
diff options
context:
space:
mode:
authorJeremy Bicha <jeremy.bicha@canonical.com>2022-11-28 16:28:37 -0500
committerJeremy Bicha <jeremy.bicha@canonical.com>2022-11-28 16:28:52 -0500
commit23b72b08c0e0079ce1c6e6daa5b2a95602290cf3 (patch)
tree423b7ab020011c905b18e4706558537d01758b8e /src/libnm-core-impl/nm-setting-bond-port.c
parent54a11b421d2f5e43f9c88eb38a0a5992e9636290 (diff)
parentdbc388c3d1132f291cf4d62455d77e71d0918dcc (diff)
Merge tag 'debian/1.40.4-1' into ubuntu/master
network-manager Debian release 1.40.4-1
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,