summary refs log tree commit diff
path: root/src/core/devices/nm-device-wireguard.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2024-09-01 22:38:35 +0200
committerMichael Biebl <biebl@debian.org>2024-09-01 22:38:35 +0200
commitf9bfd1158b8d08d6a5ed3bb7cc1ba7a6455e5201 (patch)
tree10267dcf5b842b7c638a79bd6851549cd849b81d /src/core/devices/nm-device-wireguard.c
parent681dfc70ef98f6ed0c05bcb0fbff00e3fc0799ea (diff)
New upstream version 1.49.90 upstream/1.49.90
Diffstat (limited to 'src/core/devices/nm-device-wireguard.c')
-rw-r--r--src/core/devices/nm-device-wireguard.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/core/devices/nm-device-wireguard.c b/src/core/devices/nm-device-wireguard.c
index dd40d11e..00a8c718 100644
--- a/src/core/devices/nm-device-wireguard.c
+++ b/src/core/devices/nm-device-wireguard.c
@@ -1586,26 +1586,25 @@ act_stage2_config(NMDevice *device, NMDeviceStateReason *out_failure_reason)
 {
     NMDeviceWireGuard        *self = NM_DEVICE_WIREGUARD(device);
     NMDeviceWireGuardPrivate *priv = NM_DEVICE_WIREGUARD_GET_PRIVATE(self);
-    NMDeviceSysIfaceState     sys_iface_state;
+    NMDeviceManagedType       managed_type;
     NMDeviceStateReason       failure_reason;
     NMActStageReturn          ret;
 
-    sys_iface_state = nm_device_sys_iface_state_get(device);
+    managed_type = nm_device_managed_type_get(device);
 
-    if (sys_iface_state == NM_DEVICE_SYS_IFACE_STATE_EXTERNAL) {
+    if (managed_type == NM_DEVICE_MANAGED_TYPE_EXTERNAL) {
         NM_SET_OUT(out_failure_reason, NM_DEVICE_STATE_REASON_NONE);
         return NM_ACT_STAGE_RETURN_SUCCESS;
     }
 
-    ret =
-        link_config(NM_DEVICE_WIREGUARD(device),
-                    "configure",
-                    (sys_iface_state == NM_DEVICE_SYS_IFACE_STATE_ASSUME) ? LINK_CONFIG_MODE_ASSUME
-                                                                          : LINK_CONFIG_MODE_FULL,
-                    &failure_reason);
+    ret = link_config(NM_DEVICE_WIREGUARD(device),
+                      "configure",
+                      (managed_type == NM_DEVICE_MANAGED_TYPE_ASSUME) ? LINK_CONFIG_MODE_ASSUME
+                                                                      : LINK_CONFIG_MODE_FULL,
+                      &failure_reason);
 
     if (ret == NM_ACT_STAGE_RETURN_FAILURE) {
-        if (sys_iface_state == NM_DEVICE_SYS_IFACE_STATE_ASSUME) {
+        if (managed_type == NM_DEVICE_MANAGED_TYPE_ASSUME) {
             /* this never fails. */
             return NM_ACT_STAGE_RETURN_SUCCESS;
         }