diff options
author | David S. Miller <davem@davemloft.net> | 2015-04-02 21:05:02 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-04-02 21:05:02 +0300 |
commit | e4a924f5768c55002c02ceba9b9f86824c35f956 (patch) | |
tree | ae8db8c41d5950644db9d4f5e609f228df958e57 /drivers/net/ipvlan/ipvlan_core.c | |
parent | 033f46b3c13d4072d8ee6b26dd1e90fdd06895d0 (diff) | |
parent | a45253bf32bf49cdb2807bad212b84f5ab51ac26 (diff) | |
download | linux-e4a924f5768c55002c02ceba9b9f86824c35f956.tar.xz |
Merge branch 'netdev_iflink_remove'
Nicolas Dichtel says:
====================
Remove iflink field from the net_device structure
The first goal of this series was to advertise the veth peer via the IFLA_LINK
attribute, but iflink was not ready for network namespaces.
The iflink of an interface should be set to its ifindex for a physical interface
and to another value (0 if not relevant) for a virtual interface.
This was not the case for some interfaces, like vxlan, bond, or bridge for
example.
There is also a risk, if the targeted interface moves to another netns, that the
ifindex changes without updating corresponding iflink fields (eg. vlan).
Moving the management of this property into virtual interface drivers allows to
better handle this last case because most of virtual interface drivers have a
pointer to the link netdevice.
Anyway, dev->iflink value was always a copy of some internal data of the virtual
interface driver, thus let's use these internal data directly.
So, this series removes the iflink field and let the drivers manage it.
Only the last patch was present in the v1, but I fully rework it.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ipvlan/ipvlan_core.c')
-rw-r--r-- | drivers/net/ipvlan/ipvlan_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ipvlan/ipvlan_core.c b/drivers/net/ipvlan/ipvlan_core.c index 2a175006028b..131bde98188d 100644 --- a/drivers/net/ipvlan/ipvlan_core.c +++ b/drivers/net/ipvlan/ipvlan_core.c @@ -330,7 +330,7 @@ static int ipvlan_process_v4_outbound(struct sk_buff *skb) struct rtable *rt; int err, ret = NET_XMIT_DROP; struct flowi4 fl4 = { - .flowi4_oif = dev->iflink, + .flowi4_oif = dev_get_iflink(dev), .flowi4_tos = RT_TOS(ip4h->tos), .flowi4_flags = FLOWI_FLAG_ANYSRC, .daddr = ip4h->daddr, |