diff options
author | David Ahern <dsa@cumulusnetworks.com> | 2015-10-05 17:51:24 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-10-07 13:27:43 +0200 |
commit | fee6d4c777a125e56de9370db3b2bf359bf958d6 (patch) | |
tree | 19bf245321e6d1265e34f550fd479d83ffc69aed /net/l3mdev | |
parent | net: Rename FLOWI_FLAG_VRFSRC to FLOWI_FLAG_L3MDEV_SRC (diff) | |
download | linux-fee6d4c777a125e56de9370db3b2bf359bf958d6.tar.xz linux-fee6d4c777a125e56de9370db3b2bf359bf958d6.zip |
net: Add netif_is_l3_slave
IPv6 addrconf keys off of IFF_SLAVE so can not use it for L3 slave.
Add a new private flag and add netif_is_l3_slave function for checking
it.
Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/l3mdev')
-rw-r--r-- | net/l3mdev/l3mdev.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/l3mdev/l3mdev.c b/net/l3mdev/l3mdev.c index ddf75ad41713..8e5ead366e7f 100644 --- a/net/l3mdev/l3mdev.c +++ b/net/l3mdev/l3mdev.c @@ -26,11 +26,11 @@ int l3mdev_master_ifindex_rcu(struct net_device *dev) if (netif_is_l3_master(dev)) { ifindex = dev->ifindex; - } else if (dev->flags & IFF_SLAVE) { + } else if (netif_is_l3_slave(dev)) { struct net_device *master; master = netdev_master_upper_dev_get_rcu(dev); - if (master && netif_is_l3_master(master)) + if (master) ifindex = master->ifindex; } @@ -54,7 +54,7 @@ u32 l3mdev_fib_table_rcu(const struct net_device *dev) if (netif_is_l3_master(dev)) { if (dev->l3mdev_ops->l3mdev_fib_table) tb_id = dev->l3mdev_ops->l3mdev_fib_table(dev); - } else if (dev->flags & IFF_SLAVE) { + } else if (netif_is_l3_slave(dev)) { /* Users of netdev_master_upper_dev_get_rcu need non-const, * but current inet_*type functions take a const */ @@ -62,7 +62,7 @@ u32 l3mdev_fib_table_rcu(const struct net_device *dev) const struct net_device *master; master = netdev_master_upper_dev_get_rcu(_dev); - if (master && netif_is_l3_master(master) && + if (master && master->l3mdev_ops->l3mdev_fib_table) tb_id = master->l3mdev_ops->l3mdev_fib_table(master); } |