aboutsummaryrefslogtreecommitdiffstats
path: root/net/switchdev/switchdev.c
diff options
context:
space:
mode:
authorScott Feldman <sfeldma@gmail.com>2015-06-17 19:08:31 -0400
committerDavid S. Miller <davem@davemloft.net>2015-06-23 03:58:27 -0400
commit10ea5165e44ec8467e393a84ecfbf5732605d504 (patch)
tree40a498494b91fd1aa4365700318166e262126543 /net/switchdev/switchdev.c
parent54db01a20eb0485f586299aaaceb9d064e1482fe (diff)
switchdev: fdb filter_dev is always NULL for self (device), so remove check
Remove the filter_dev check when dumping fdb entries, otherwise dump returns empty list. filter_dev is always passed as NULL when dumping fdbs on SELF. We want the fdbs installed on the device to be listed in the dump. Signed-off-by: Scott Feldman <sfeldma@gmail.com> Fixes: 45d4122c ("switchdev: add support for fdb add/del/dump via switchdev_port_obj ops") Acked-by: Sridhar Samudrala <sridhar.samudrala@intel.com> Acked-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/switchdev/switchdev.c')
-rw-r--r--net/switchdev/switchdev.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/net/switchdev/switchdev.c b/net/switchdev/switchdev.c
index 658bc3ac8008..c29f2327f2e6 100644
--- a/net/switchdev/switchdev.c
+++ b/net/switchdev/switchdev.c
@@ -656,7 +656,6 @@ struct switchdev_fdb_dump {
656 struct switchdev_obj obj; 656 struct switchdev_obj obj;
657 struct sk_buff *skb; 657 struct sk_buff *skb;
658 struct netlink_callback *cb; 658 struct netlink_callback *cb;
659 struct net_device *filter_dev;
660 int idx; 659 int idx;
661}; 660};
662 661
@@ -669,14 +668,10 @@ static int switchdev_port_fdb_dump_cb(struct net_device *dev,
669 u32 seq = dump->cb->nlh->nlmsg_seq; 668 u32 seq = dump->cb->nlh->nlmsg_seq;
670 struct nlmsghdr *nlh; 669 struct nlmsghdr *nlh;
671 struct ndmsg *ndm; 670 struct ndmsg *ndm;
672 struct net_device *master = netdev_master_upper_dev_get(dev);
673 671
674 if (dump->idx < dump->cb->args[0]) 672 if (dump->idx < dump->cb->args[0])
675 goto skip; 673 goto skip;
676 674
677 if (master && dump->filter_dev != master)
678 goto skip;
679
680 nlh = nlmsg_put(dump->skb, portid, seq, RTM_NEWNEIGH, 675 nlh = nlmsg_put(dump->skb, portid, seq, RTM_NEWNEIGH,
681 sizeof(*ndm), NLM_F_MULTI); 676 sizeof(*ndm), NLM_F_MULTI);
682 if (!nlh) 677 if (!nlh)
@@ -730,7 +725,6 @@ int switchdev_port_fdb_dump(struct sk_buff *skb, struct netlink_callback *cb,
730 }, 725 },
731 .skb = skb, 726 .skb = skb,
732 .cb = cb, 727 .cb = cb,
733 .filter_dev = filter_dev,
734 .idx = idx, 728 .idx = idx,
735 }; 729 };
736 int err; 730 int err;