diff --git a/SOURCES/1003-manager-accept-non-null-device-for-VPN-activations-rh1641174.patch b/SOURCES/1003-manager-accept-non-null-device-for-VPN-activations-rh1641174.patch new file mode 100644 index 0000000..7594cb8 --- /dev/null +++ b/SOURCES/1003-manager-accept-non-null-device-for-VPN-activations-rh1641174.patch @@ -0,0 +1,58 @@ +From 7b6c55fb10c8f500a79075a66d6f5387199392be Mon Sep 17 00:00:00 2001 +From: Beniamino Galvani +Date: Fri, 6 Jul 2018 15:54:16 +0200 +Subject: [PATCH] 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 +Fixes: 10753c36168a82cd658df8a7da800960fddd78ed + +https://github.com/NetworkManager/NetworkManager/pull/159 +(cherry picked from commit e205664ba8c25939f1678d1b078a67989c180046) +(cherry picked from commit 9748aef7c7982ad1fe377ab6fc64255fcdb52762) +--- + 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 0fea13de6..289dcf838 100644 +--- a/src/nm-manager.c ++++ b/src/nm-manager.c +@@ -4611,21 +4611,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; +-- +2.17.1 + diff --git a/SPECS/NetworkManager.spec b/SPECS/NetworkManager.spec index 04bbcc1..701889b 100644 --- a/SPECS/NetworkManager.spec +++ b/SPECS/NetworkManager.spec @@ -10,7 +10,7 @@ %global epoch_version 1 %global rpm_version 1.12.0 %global real_version 1.12.0 -%global release_version 6 +%global release_version 7 %global snapshot %{nil} %global git_sha %{nil} @@ -128,6 +128,7 @@ Patch8: 0008-dns-dnsmsaq-avoid-crash-no-rev-domains-rh1628576.patch Patch1000: 1000-cli-remove-assertion-in-nmc_device_state_to_color.patch Patch1001: 1001-translations-rh1569438.patch Patch1002: 1002-cli-fix-reading-vpn.secrets.-from-passwd-file.patch +Patch1003: 1003-manager-accept-non-null-device-for-VPN-activations-rh1641174.patch # The pregenerated docs contain default values and paths that depend # on the configure options when creating the source tarball. @@ -320,7 +321,9 @@ devices. Summary: Open vSwitch device plugin for NetworkManager Group: System Environment/Base Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} +%if 0%{?rhel} == 0 Requires: openvswitch +%endif %description ovs This package contains NetworkManager support for Open vSwitch bridges. @@ -886,6 +889,10 @@ fi %changelog +* Mon Oct 22 2018 Beniamino Galvani - 1:1.12.0-7 +- manager: accept non-null device for VPN activations (rh #1641174) +- drop dependency of NetworkManager-ovs on openvswitch (rh #1633190) + * Sat Sep 15 2018 Beniamino Galvani - 1:1.12.0-6 - dns: dnsmasq: avoid crash when no reverse domains exist (rh #1628576) - initscripts: fix ownership of ifup/ifdown executables (rh #1626517)