about summary refs log tree commit diff
path: root/src/core/devices/nm-device-6lowpan.c
diff options
context:
space:
mode:
authorJeremy Bicha <jeremy.bicha@canonical.com>2022-02-03 09:24:19 -0500
committerJeremy Bicha <jeremy.bicha@canonical.com>2022-02-03 12:01:26 -0500
commit240934659cd8326a14324c73d4f0f88eecfddcab (patch)
treee07cde48aa0a143bebf10ca7103cc0e69febad25 /src/core/devices/nm-device-6lowpan.c
parentfbe61ddadf4a89800a8e3651ae91099259ddf2ad (diff)
parent1628eda029ba4dede8d4d45572c6b60367882436 (diff)
Merge tag 'debian/1.34.0-2' into ubuntu/master
network-manager Debian release 1.34.0-2
Diffstat (limited to 'src/core/devices/nm-device-6lowpan.c')
-rw-r--r--src/core/devices/nm-device-6lowpan.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/core/devices/nm-device-6lowpan.c b/src/core/devices/nm-device-6lowpan.c
index 96218658..8b77c22c 100644
--- a/src/core/devices/nm-device-6lowpan.c
+++ b/src/core/devices/nm-device-6lowpan.c
@@ -9,6 +9,7 @@
 
 #include "nm-device-private.h"
 #include "settings/nm-settings.h"
+#include "libnm-core-aux-intern/nm-libnm-core-utils.h"
 #include "libnm-platform/nm-platform.h"
 #include "nm-device-factory.h"
 #include "nm-setting-6lowpan.h"
@@ -221,12 +222,7 @@ static void
 update_connection(NMDevice *device, NMConnection *connection)
 {
     NMSetting6Lowpan *s_6lowpan =
-        NM_SETTING_6LOWPAN(nm_connection_get_setting(connection, NM_TYPE_SETTING_6LOWPAN));
-
-    if (!s_6lowpan) {
-        s_6lowpan = (NMSetting6Lowpan *) nm_setting_6lowpan_new();
-        nm_connection_add_setting(connection, (NMSetting *) s_6lowpan);
-    }
+        _nm_connection_ensure_setting(connection, NM_TYPE_SETTING_6LOWPAN);
 
     g_object_set(
         s_6lowpan,