vpn: apply parent config in nm_vpn_connection_apply_config() first

In practice, it shouldn't matter much, because NM may frequently
reapply the IP config. Hence, it anyway must cope with the fact that
IP config from a previous iteration is already applied on the VPN device,
before applying it to the parent device.

Anyway, it makes a bit more sense to apply it first the the parent device.
This commit is contained in:
Thomas Haller 2017-09-07 10:35:12 +02:00
parent c8e6f3e5fb
commit cac10198f6

View file

@ -1135,6 +1135,8 @@ nm_vpn_connection_apply_config (NMVpnConnection *self)
{
NMVpnConnectionPrivate *priv = NM_VPN_CONNECTION_GET_PRIVATE (self);
apply_parent_device_config (self);
if (priv->ip_ifindex > 0) {
nm_platform_link_set_up (nm_netns_get_platform (priv->netns), priv->ip_ifindex, NULL);
@ -1157,8 +1159,6 @@ nm_vpn_connection_apply_config (NMVpnConnection *self)
nm_platform_link_set_mtu (nm_netns_get_platform (priv->netns), priv->ip_ifindex, priv->mtu);
}
apply_parent_device_config (self);
nm_default_route_manager_ip4_update_default_route (nm_netns_get_default_route_manager (priv->netns), self);
nm_default_route_manager_ip6_update_default_route (nm_netns_get_default_route_manager (priv->netns), self);