diff options
author | Nicolas Dichtel <nicolas.dichtel@6wind.com> | 2015-04-02 11:07:00 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-04-02 14:04:59 -0400 |
commit | a54acb3a6f853e8394c4cb7b6a4d93c88f13eefd (patch) | |
tree | b1e887d2bc8c205d4fe3b331e40fddba5de6ee01 /net/core/rtnetlink.c | |
parent | 033f46b3c13d4072d8ee6b26dd1e90fdd06895d0 (diff) |
dev: introduce dev_get_iflink()
The goal of this patch is to prepare the removal of the iflink field. It
introduces a new ndo function, which will be implemented by virtual interfaces.
There is no functional change into this patch. All readers of iflink field
now call dev_get_iflink().
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/rtnetlink.c')
-rw-r--r-- | net/core/rtnetlink.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index b96ac2109c82..ee0186cdd5cf 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c | |||
@@ -1055,8 +1055,8 @@ static int rtnl_fill_ifinfo(struct sk_buff *skb, struct net_device *dev, | |||
1055 | #ifdef CONFIG_RPS | 1055 | #ifdef CONFIG_RPS |
1056 | nla_put_u32(skb, IFLA_NUM_RX_QUEUES, dev->num_rx_queues) || | 1056 | nla_put_u32(skb, IFLA_NUM_RX_QUEUES, dev->num_rx_queues) || |
1057 | #endif | 1057 | #endif |
1058 | (dev->ifindex != dev->iflink && | 1058 | (dev->ifindex != dev_get_iflink(dev) && |
1059 | nla_put_u32(skb, IFLA_LINK, dev->iflink)) || | 1059 | nla_put_u32(skb, IFLA_LINK, dev_get_iflink(dev))) || |
1060 | (upper_dev && | 1060 | (upper_dev && |
1061 | nla_put_u32(skb, IFLA_MASTER, upper_dev->ifindex)) || | 1061 | nla_put_u32(skb, IFLA_MASTER, upper_dev->ifindex)) || |
1062 | nla_put_u8(skb, IFLA_CARRIER, netif_carrier_ok(dev)) || | 1062 | nla_put_u8(skb, IFLA_CARRIER, netif_carrier_ok(dev)) || |
@@ -2863,8 +2863,8 @@ int ndo_dflt_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq, | |||
2863 | nla_put_u32(skb, IFLA_MASTER, br_dev->ifindex)) || | 2863 | nla_put_u32(skb, IFLA_MASTER, br_dev->ifindex)) || |
2864 | (dev->addr_len && | 2864 | (dev->addr_len && |
2865 | nla_put(skb, IFLA_ADDRESS, dev->addr_len, dev->dev_addr)) || | 2865 | nla_put(skb, IFLA_ADDRESS, dev->addr_len, dev->dev_addr)) || |
2866 | (dev->ifindex != dev->iflink && | 2866 | (dev->ifindex != dev_get_iflink(dev) && |
2867 | nla_put_u32(skb, IFLA_LINK, dev->iflink))) | 2867 | nla_put_u32(skb, IFLA_LINK, dev_get_iflink(dev)))) |
2868 | goto nla_put_failure; | 2868 | goto nla_put_failure; |
2869 | 2869 | ||
2870 | br_afspec = nla_nest_start(skb, IFLA_AF_SPEC); | 2870 | br_afspec = nla_nest_start(skb, IFLA_AF_SPEC); |