summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorDavid Ahern <dsa@cumulusnetworks.com>2015-10-05 18:51:24 +0300
committerDavid S. Miller <davem@davemloft.net>2015-10-07 14:27:43 +0300
commitfee6d4c777a125e56de9370db3b2bf359bf958d6 (patch)
tree19bf245321e6d1265e34f550fd479d83ffc69aed /net
parent6e2895a8e3824eb5611c97a015a3b6d678b4503e (diff)
downloadlinux-fee6d4c777a125e56de9370db3b2bf359bf958d6.tar.xz
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')
-rw-r--r--net/l3mdev/l3mdev.c8
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);
}