diff options
| author | Michael Biebl <biebl@debian.org> | 2018-07-12 13:23:13 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2018-07-12 13:23:13 +0200 |
| commit | c571f43fba51a2dcd2dbc640df5c901dd8863b97 (patch) | |
| tree | 7730390a68a965fb585f7fe533b9a9b58e3e4905 | |
| parent | 06ca8a549af06a39c722a501eda950461e9981d7 (diff) | |
manager: accept non-null device for VPN activations
Closes: #903109
| -rw-r--r-- | debian/patches/manager-accept-non-null-device-for-VPN-activations.patch | 53 | ||||
| -rw-r--r-- | debian/patches/series | 1 |
2 files changed, 54 insertions, 0 deletions
diff --git a/debian/patches/manager-accept-non-null-device-for-VPN-activations.patch b/debian/patches/manager-accept-non-null-device-for-VPN-activations.patch new file mode 100644 index 00000000..4a60db6c --- /dev/null +++ b/debian/patches/manager-accept-non-null-device-for-VPN-activations.patch @@ -0,0 +1,53 @@ +From: Beniamino Galvani <bgalvani@redhat.com> +Date: Fri, 6 Jul 2018 15:54:16 +0200 +Subject: manager: accept non-null device for VPN activations + +Commit 10753c36168a ("manager: merge VPN handling into +_new_active_connection()") added a check to fail the activation of +VPNs when a device is passed to ActivateConnection(), since the device +argument is ignored for VPNs. + +This broke activating VPNs from nm-applet as nm-applet sets both the +specific_object (parent-connection) and device arguments in the +activation request. + +Note that we already check in _new_active_connection() that when a +device is supplied, it matches the device of the parent +connection. Therefore, the check can be dropped. + +Reported-by: Michael Biebl <biebl@debian.org> +Fixes: 10753c36168a82cd658df8a7da800960fddd78ed + +https://github.com/NetworkManager/NetworkManager/pull/159 +(cherry picked from commit e205664ba8c25939f1678d1b078a67989c180046) +--- + src/nm-manager.c | 16 +--------------- + 1 file changed, 1 insertion(+), 15 deletions(-) + +diff --git a/src/nm-manager.c b/src/nm-manager.c +index 150d7de..1b657fe 100644 +--- a/src/nm-manager.c ++++ b/src/nm-manager.c +@@ -4641,21 +4641,7 @@ validate_activation_request (NMManager *self, + } + } + +- if (is_vpn && device) { +- /* VPN's are treated specially. Maybe the should accept a device as well, +- * however, later on during activation, we don't handle the device. +- * +- * Maybe we should, and maybe it makes sense to specify a device +- * when activating a VPN. But for now, just error out. */ +- g_set_error_literal (error, +- NM_MANAGER_ERROR, +- NM_MANAGER_ERROR_UNKNOWN_DEVICE, +- "Cannot specify device when activating VPN"); +- return NULL; +- } +- +- nm_assert ( ( is_vpn && !device) +- || (!is_vpn && NM_IS_DEVICE (device))); ++ nm_assert (is_vpn || NM_IS_DEVICE (device)); + + *out_device = device; + *out_is_vpn = is_vpn; diff --git a/debian/patches/series b/debian/patches/series index 9f28a9f4..503d30bf 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -3,3 +3,4 @@ Don-t-setup-Sleep-Monitor-if-not-booted-with-systemd.patch Don-t-make-NetworkManager-D-Bus-activatable.patch Fix-iscsiadm-path.patch Increase-timeout-in-test-nm-client-to-30s.patch +manager-accept-non-null-device-for-VPN-activations.patch |