From 52711b5d891c4b065961d86a37514c553bbe4d09 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Tue, 20 Jan 2015 18:50:20 +0100 Subject: ip6-config: keep track of ifindex No functional change, a cosmetic thing for now. We want it set before any routes are added and ensure routes have a valid ifindex before we pass it to the platform. In a future NMRouteManager will need to look up the route for a device in its cache thus we'll need to make sure routes passed to the it have an appropriate ifindex set. --- src/vpn-manager/nm-vpn-connection.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/vpn-manager') diff --git a/src/vpn-manager/nm-vpn-connection.c b/src/vpn-manager/nm-vpn-connection.c index fc2738ad90..073527122d 100644 --- a/src/vpn-manager/nm-vpn-connection.c +++ b/src/vpn-manager/nm-vpn-connection.c @@ -897,8 +897,10 @@ apply_parent_device_config (NMVpnConnection *connection) vpn4_parent_config = nm_ip4_config_new (); nm_ip4_config_set_ifindex (vpn4_parent_config, priv->ip_ifindex); } - if (priv->ip6_config) + if (priv->ip6_config) { vpn6_parent_config = nm_ip6_config_new (); + nm_ip6_config_set_ifindex (vpn6_parent_config, priv->ip_ifindex); + } if (priv->ip_ifindex <= 0) { /* If the VPN didn't return a network interface, it is a route-based @@ -1339,6 +1341,7 @@ nm_vpn_connection_ip6_config_get (DBusGProxy *proxy, } config = nm_ip6_config_new (); + nm_ip6_config_set_ifindex (config, priv->ip_ifindex); memset (&address, 0, sizeof (address)); address.plen = 128; -- cgit v1.2.1