summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-07-10 17:23:38 +0200
committerThomas Haller <thaller@redhat.com>2015-07-13 13:39:34 +0200
commit5cd131610088c3b54fde02aa1ecd06ce69fbb2a8 (patch)
tree8b327547d0a6e39407fa590ace65f8df5da35b42
parent16d0850c37920d01a3d55ddba41325be2e0b719a (diff)
downloadNetworkManager-5cd131610088c3b54fde02aa1ecd06ce69fbb2a8.tar.gz
vpn: don't set the gateway of VPN's IP config to the external gateway
The gateway property of NMIP4Config/IP6Config determines the next hop for the default route. That is different from the @external_gw property of the VPN which is the address of the world-reachable VPN gateway. It is wrong to set the gateway of the VPN's IP config to the external gateway. This causes ip4_config_merge_and_apply() to overwrite the gateway of the underlying device. Instead, NMDefaultRouteManger gets the gateway directly from the VPN connection by quering nm_vpn_connection_get_ip4_internal_gateway().
-rw-r--r--src/vpn-manager/nm-vpn-connection.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/vpn-manager/nm-vpn-connection.c b/src/vpn-manager/nm-vpn-connection.c
index 33fde937b6..f3ff541c9c 100644
--- a/src/vpn-manager/nm-vpn-connection.c
+++ b/src/vpn-manager/nm-vpn-connection.c
@@ -1182,8 +1182,6 @@ nm_vpn_connection_ip4_config_get (NMVpnConnection *self, GVariant *dict)
memset (&address, 0, sizeof (address));
address.plen = 24;
- if (priv->ip4_external_gw)
- nm_ip4_config_set_gateway (config, priv->ip4_external_gw);
/* Internal address of the VPN subnet's gateway */
if (g_variant_lookup (dict, NM_VPN_PLUGIN_IP4_CONFIG_INT_GATEWAY, "u", &u32))
@@ -1308,8 +1306,6 @@ nm_vpn_connection_ip6_config_get (NMVpnConnection *self, GVariant *dict)
memset (&address, 0, sizeof (address));
address.plen = 128;
- if (priv->ip6_external_gw)
- nm_ip6_config_set_gateway (config, priv->ip6_external_gw);
/* Internal address of the VPN subnet's gateway */
g_clear_pointer (&priv->ip6_internal_gw, g_free);