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>
This commit is contained in:
committed by
David S. Miller
parent
033f46b3c1
commit
a54acb3a6f
@ -305,8 +305,8 @@ static int br_fill_ifinfo(struct sk_buff *skb,
|
||||
nla_put_u8(skb, IFLA_OPERSTATE, operstate) ||
|
||||
(dev->addr_len &&
|
||||
nla_put(skb, IFLA_ADDRESS, dev->addr_len, dev->dev_addr)) ||
|
||||
(dev->ifindex != dev->iflink &&
|
||||
nla_put_u32(skb, IFLA_LINK, dev->iflink)))
|
||||
(dev->ifindex != dev_get_iflink(dev) &&
|
||||
nla_put_u32(skb, IFLA_LINK, dev_get_iflink(dev))))
|
||||
goto nla_put_failure;
|
||||
|
||||
if (event == RTM_NEWLINK && port) {
|
||||
|
Reference in New Issue
Block a user