summaryrefslogtreecommitdiff
path: root/net/l3mdev
diff options
context:
space:
mode:
Diffstat (limited to 'net/l3mdev')
-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);
}