aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/bridge/br_fdb.c7
-rw-r--r--net/core/rtnetlink.c5
2 files changed, 9 insertions, 3 deletions
diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c
index cc36e59db7d7..e6e0372bc3cd 100644
--- a/net/bridge/br_fdb.c
+++ b/net/bridge/br_fdb.c
@@ -686,6 +686,9 @@ int br_fdb_dump(struct sk_buff *skb,
686 if (!(dev->priv_flags & IFF_EBRIDGE)) 686 if (!(dev->priv_flags & IFF_EBRIDGE))
687 goto out; 687 goto out;
688 688
689 if (!filter_dev)
690 idx = ndo_dflt_fdb_dump(skb, cb, dev, NULL, idx);
691
689 for (i = 0; i < BR_HASH_SIZE; i++) { 692 for (i = 0; i < BR_HASH_SIZE; i++) {
690 struct net_bridge_fdb_entry *f; 693 struct net_bridge_fdb_entry *f;
691 694
@@ -697,7 +700,7 @@ int br_fdb_dump(struct sk_buff *skb,
697 (!f->dst || f->dst->dev != filter_dev)) { 700 (!f->dst || f->dst->dev != filter_dev)) {
698 if (filter_dev != dev) 701 if (filter_dev != dev)
699 goto skip; 702 goto skip;
700 /* !f->dst is a speacial case for bridge 703 /* !f->dst is a special case for bridge
701 * It means the MAC belongs to the bridge 704 * It means the MAC belongs to the bridge
702 * Therefore need a little more filtering 705 * Therefore need a little more filtering
703 * we only want to dump the !f->dst case 706 * we only want to dump the !f->dst case
@@ -705,6 +708,8 @@ int br_fdb_dump(struct sk_buff *skb,
705 if (f->dst) 708 if (f->dst)
706 goto skip; 709 goto skip;
707 } 710 }
711 if (!filter_dev && f->dst)
712 goto skip;
708 713
709 if (fdb_fill_info(skb, br, f, 714 if (fdb_fill_info(skb, br, f,
710 NETLINK_CB(cb->skb).portid, 715 NETLINK_CB(cb->skb).portid,
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 9cf6fe9ddc0c..da983d4bac02 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -2698,10 +2698,11 @@ static int rtnl_fdb_dump(struct sk_buff *skb, struct netlink_callback *cb)
2698 idx); 2698 idx);
2699 } 2699 }
2700 2700
2701 idx = ndo_dflt_fdb_dump(skb, cb, dev, NULL, idx);
2702 if (dev->netdev_ops->ndo_fdb_dump) 2701 if (dev->netdev_ops->ndo_fdb_dump)
2703 idx = dev->netdev_ops->ndo_fdb_dump(skb, cb, bdev, dev, 2702 idx = dev->netdev_ops->ndo_fdb_dump(skb, cb, dev, NULL,
2704 idx); 2703 idx);
2704 else
2705 idx = ndo_dflt_fdb_dump(skb, cb, dev, NULL, idx);
2705 2706
2706 cops = NULL; 2707 cops = NULL;
2707 } 2708 }