mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-22 17:20:41 +01:00
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().
(cherry picked from commit 5cd1316100)
This commit is contained in:
parent
8cda578fe2
commit
44c6296cae
1 changed files with 0 additions and 4 deletions
|
|
@ -1194,8 +1194,6 @@ nm_vpn_connection_ip4_config_get (DBusGProxy *proxy,
|
|||
|
||||
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 */
|
||||
val = (GValue *) g_hash_table_lookup (config_hash, NM_VPN_PLUGIN_IP4_CONFIG_INT_GATEWAY);
|
||||
|
|
@ -1339,8 +1337,6 @@ nm_vpn_connection_ip6_config_get (DBusGProxy *proxy,
|
|||
|
||||
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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue