NetworkManager/0003-vpn-connection-fix-uns...

32 lines
1.3 KiB
Diff

From 15e4ee69dfeec8dd3670da262c11306de7488156 Mon Sep 17 00:00:00 2001
From: Lubomir Rintel <lkundrak@v3.sk>
Date: Wed, 2 Sep 2015 19:19:18 +0200
Subject: [PATCH 3/4] vpn-connection: fix unsetting the gateway
Addresses the clash between the two commits which would cause the parent device
gateway to be overwritten with 0.0.0.0 upon route-based VPN activation:
Fixes: 063677101ab7d43a9aa94c70eb1ca3a201269043
Fixes: 1465c1d3260712fbe2fd0c78c7a1fcf0fb8ce753
(cherry picked from commit da2ae8ce4e6cb03931454d7d6fa94866b03f6be2)
---
src/vpn-manager/nm-vpn-connection.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/vpn-manager/nm-vpn-connection.c b/src/vpn-manager/nm-vpn-connection.c
index c34155e..f0e6149 100644
--- a/src/vpn-manager/nm-vpn-connection.c
+++ b/src/vpn-manager/nm-vpn-connection.c
@@ -933,7 +933,7 @@ apply_parent_device_config (NMVpnConnection *connection)
* default route. */
if (vpn4_parent_config) {
nm_ip4_config_merge (vpn4_parent_config, priv->ip4_config, NM_IP_CONFIG_MERGE_DEFAULT);
- nm_ip4_config_set_gateway (vpn4_parent_config, 0);
+ nm_ip4_config_unset_gateway (vpn4_parent_config);
}
if (vpn6_parent_config) {
nm_ip6_config_merge (vpn6_parent_config, priv->ip6_config, NM_IP_CONFIG_MERGE_DEFAULT);
--
2.4.3