diff options
| author | Michael Biebl <biebl@debian.org> | 2024-01-25 09:52:07 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2024-01-25 09:52:07 +0100 |
| commit | 3f35ad21e97570773d0d120204e84152f55206ca (patch) | |
| tree | 2e297499652a35019e690f69a937ea3f5dbb9031 /debian | |
| parent | f08ec8262eaf09154be59794ae864d6b8556030c (diff) | |
Rebase patches
Diffstat (limited to 'debian')
4 files changed, 8 insertions, 149 deletions
diff --git a/debian/patches/Force-online-state-with-unmanaged-devices.patch b/debian/patches/Force-online-state-with-unmanaged-devices.patch index 74245b18..f4ce409a 100644 --- a/debian/patches/Force-online-state-with-unmanaged-devices.patch +++ b/debian/patches/Force-online-state-with-unmanaged-devices.patch @@ -12,7 +12,7 @@ Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=512286 1 file changed, 115 insertions(+) diff --git a/src/core/nm-manager.c b/src/core/nm-manager.c -index 937acbb..874591f 100644 +index 9c58a47..d520dd6 100644 --- a/src/core/nm-manager.c +++ b/src/core/nm-manager.c @@ -53,6 +53,8 @@ @@ -24,7 +24,7 @@ index 937acbb..874591f 100644 /*****************************************************************************/ typedef struct { -@@ -229,6 +231,10 @@ typedef struct { +@@ -228,6 +230,10 @@ typedef struct { GFileMonitor *fw_monitor; guint fw_changed_id; @@ -35,7 +35,7 @@ index 937acbb..874591f 100644 guint timestamp_update_id; guint devices_inited_id; -@@ -2034,6 +2040,27 @@ find_best_device_state(NMManager *manager) +@@ -2033,6 +2039,27 @@ find_best_device_state(NMManager *manager) return best_state; } @@ -63,7 +63,7 @@ index 937acbb..874591f 100644 static void nm_manager_update_metered(NMManager *self) { -@@ -2080,6 +2107,9 @@ nm_manager_update_state(NMManager *self) +@@ -2079,6 +2106,9 @@ nm_manager_update_state(NMManager *self) else new_state = find_best_device_state(self); @@ -73,7 +73,7 @@ index 937acbb..874591f 100644 if (new_state >= NM_STATE_CONNECTED_LOCAL && priv->connectivity_state == NM_CONNECTIVITY_FULL) { new_state = NM_STATE_CONNECTED_GLOBAL; } -@@ -7709,6 +7739,62 @@ impl_manager_get_logging(NMDBusObject *obj, +@@ -7673,6 +7703,62 @@ impl_manager_get_logging(NMDBusObject *obj, g_variant_new("(ss)", nm_logging_level_to_string(), nm_logging_domains_to_string())); } @@ -136,7 +136,7 @@ index 937acbb..874591f 100644 typedef struct { NMManager *self; GDBusMethodInvocation *context; -@@ -8001,6 +8087,9 @@ nm_manager_start(NMManager *self, GError **error) +@@ -7965,6 +8051,9 @@ nm_manager_start(NMManager *self, GError **error) nm_clear_g_source(&priv->devices_inited_id); priv->devices_inited_id = g_idle_add_full(G_PRIORITY_LOW + 10, devices_inited_cb, self, NULL); @@ -146,7 +146,7 @@ index 937acbb..874591f 100644 return TRUE; } -@@ -8886,6 +8975,22 @@ nm_manager_init(NMManager *self) +@@ -8848,6 +8937,22 @@ nm_manager_init(NMManager *self) _LOGW(LOGD_CORE, "failed to monitor kernel firmware directory '%s'.", KERNEL_FIRMWARE_DIR); } @@ -169,7 +169,7 @@ index 937acbb..874591f 100644 priv->metered = NM_METERED_UNKNOWN; priv->sleep_devices = g_hash_table_new(nm_direct_hash, NULL); } -@@ -9176,6 +9281,16 @@ dispose(GObject *object) +@@ -9138,6 +9243,16 @@ dispose(GObject *object) g_clear_object(&priv->fw_monitor); } diff --git a/debian/patches/core-add-reason-argument-to-NMActiveConnection-device_sta.patch b/debian/patches/core-add-reason-argument-to-NMActiveConnection-device_sta.patch deleted file mode 100644 index e70025ed..00000000 --- a/debian/patches/core-add-reason-argument-to-NMActiveConnection-device_sta.patch +++ /dev/null @@ -1,74 +0,0 @@ -From: Beniamino Galvani <bgalvani@redhat.com> -Date: Sat, 21 Oct 2023 22:22:15 +0200 -Subject: core: add "reason" argument to NMActiveConnection - device_state_changed() - -NMActiveConnection implements method device_state_changed() that -re-emits device state changes as convenience for subclasses. Add the -reason for the state change to the handler, as it will be used in the -next commit. - -(cherry picked from commit 634dd2f5e865c9ec167e0ca4fb04802e06ebd5d0) ---- - src/core/nm-act-request.c | 3 ++- - src/core/nm-active-connection.c | 3 ++- - src/core/nm-active-connection.h | 3 ++- - src/core/vpn/nm-vpn-connection.c | 3 ++- - 4 files changed, 8 insertions(+), 4 deletions(-) - -diff --git a/src/core/nm-act-request.c b/src/core/nm-act-request.c -index dce18ba..8fcff63 100644 ---- a/src/core/nm-act-request.c -+++ b/src/core/nm-act-request.c -@@ -259,7 +259,8 @@ static void - device_state_changed(NMActiveConnection *active, - NMDevice *device, - NMDeviceState new_state, -- NMDeviceState old_state) -+ NMDeviceState old_state, -+ NMDeviceStateReason reason) - { - NMActiveConnectionState cur_ac_state = nm_active_connection_get_state(active); - NMActiveConnectionState ac_state = NM_ACTIVE_CONNECTION_STATE_UNKNOWN; -diff --git a/src/core/nm-active-connection.c b/src/core/nm-active-connection.c -index 36a11f7..5feab96 100644 ---- a/src/core/nm-active-connection.c -+++ b/src/core/nm-active-connection.c -@@ -636,7 +636,8 @@ device_state_changed(NMDevice *device, - NM_ACTIVE_CONNECTION_GET_CLASS(self)->device_state_changed(self, - device, - new_state, -- old_state); -+ old_state, -+ reason); - } - - static void -diff --git a/src/core/nm-active-connection.h b/src/core/nm-active-connection.h -index 15db68c..8032294 100644 ---- a/src/core/nm-active-connection.h -+++ b/src/core/nm-active-connection.h -@@ -78,7 +78,8 @@ typedef struct { - void (*device_state_changed)(NMActiveConnection *connection, - NMDevice *device, - NMDeviceState new_state, -- NMDeviceState old_state); -+ NMDeviceState old_state, -+ NMDeviceStateReason reason); - void (*master_failed)(NMActiveConnection *connection); - - void (*device_changed)(NMActiveConnection *connection, -diff --git a/src/core/vpn/nm-vpn-connection.c b/src/core/vpn/nm-vpn-connection.c -index d7102a1..3dba9ff 100644 ---- a/src/core/vpn/nm-vpn-connection.c -+++ b/src/core/vpn/nm-vpn-connection.c -@@ -1143,7 +1143,8 @@ static void - device_state_changed(NMActiveConnection *active, - NMDevice *device, - NMDeviceState new_state, -- NMDeviceState old_state) -+ NMDeviceState old_state, -+ NMDeviceStateReason reason) - { - if (_service_and_connection_can_persist(NM_VPN_CONNECTION(active))) { - if (new_state <= NM_DEVICE_STATE_DISCONNECTED || new_state == NM_DEVICE_STATE_FAILED) { diff --git a/debian/patches/core-propagate-the-user-requested-reason-for-act-request-.patch b/debian/patches/core-propagate-the-user-requested-reason-for-act-request-.patch deleted file mode 100644 index e75e3192..00000000 --- a/debian/patches/core-propagate-the-user-requested-reason-for-act-request-.patch +++ /dev/null @@ -1,65 +0,0 @@ -From: Beniamino Galvani <bgalvani@redhat.com> -Date: Sun, 22 Oct 2023 08:38:55 +0200 -Subject: core: propagate the user-requested reason for act-request - disconnection - -If the device is being disconnected for a user request, at the moment -the active connection goes to state DEACTIVATED through the following -transitions, independently of the reason for the disconnection: - - - state: DEACTIVATING, reason: UNKNOWN - - state: DEACTIVATED, reason: DEVICE_DISCONNECTED - -For VPNs, a disconnection is always user-initiated, and the active -connection states emitted are: - - - state: DEACTIVATING, reason: USER_DISCONNECTED - - state: DEACTIVATED, reason: USER_DISCONNECTED - -This difference poses problems for clients that want to handle device -and VPNs in the same way, especially because WireGuard is implemented -as a device, but is logically a VPN. - -Let NMActRequest translate the USER_REQUESTED device state reason to -USER_DISCONNECTED active connection state reason, in case of -disconnection. - -This is an API change, but the previous behavior of reporting generic -uninformative reasons seems a bug. See for example -nmc_activation_get_effective_state(), which inspects the AC state -reason and in case it's generic (DEVICE_DISCONNECTED), it considers -the device state instead. - -https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1405 -(cherry picked from commit d3db0883c7723a9e150ea9856bd8678480c99874) ---- - src/core/nm-act-request.c | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - -diff --git a/src/core/nm-act-request.c b/src/core/nm-act-request.c -index 8fcff63..bed7ffd 100644 ---- a/src/core/nm-act-request.c -+++ b/src/core/nm-act-request.c -@@ -320,14 +320,20 @@ device_state_changed(NMActiveConnection *active, - active); - break; - case NM_DEVICE_STATE_DEACTIVATING: -+ if (reason == NM_DEVICE_STATE_REASON_USER_REQUESTED) -+ ac_state_reason = NM_ACTIVE_CONNECTION_STATE_REASON_USER_DISCONNECTED; -+ - ac_state = NM_ACTIVE_CONNECTION_STATE_DEACTIVATING; - break; - case NM_DEVICE_STATE_FAILED: - case NM_DEVICE_STATE_DISCONNECTED: - case NM_DEVICE_STATE_UNMANAGED: - case NM_DEVICE_STATE_UNAVAILABLE: -- ac_state = NM_ACTIVE_CONNECTION_STATE_DEACTIVATED; -- ac_state_reason = NM_ACTIVE_CONNECTION_STATE_REASON_DEVICE_DISCONNECTED; -+ ac_state = NM_ACTIVE_CONNECTION_STATE_DEACTIVATED; -+ if (reason == NM_DEVICE_STATE_REASON_USER_REQUESTED) -+ ac_state_reason = NM_ACTIVE_CONNECTION_STATE_REASON_USER_DISCONNECTED; -+ else -+ ac_state_reason = NM_ACTIVE_CONNECTION_STATE_REASON_DEVICE_DISCONNECTED; - - g_signal_handlers_disconnect_by_func(device, G_CALLBACK(device_notify), active); - break; diff --git a/debian/patches/series b/debian/patches/series index 83f7b7ab..a2d7e06d 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1 @@ Force-online-state-with-unmanaged-devices.patch -core-add-reason-argument-to-NMActiveConnection-device_sta.patch -core-propagate-the-user-requested-reason-for-act-request-.patch |