mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
bridge: fdb dumping takes a filter device
Dumping a bridge fdb dumps every fdb entry held. With this change we are going to filter on selected bridge port. Signed-off-by: Jamal Hadi Salim <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
69b4b7a414
commit
5d5eacb34c
8 changed files with 24 additions and 10 deletions
|
|
@ -676,6 +676,7 @@ errout:
|
|||
int br_fdb_dump(struct sk_buff *skb,
|
||||
struct netlink_callback *cb,
|
||||
struct net_device *dev,
|
||||
struct net_device *filter_dev,
|
||||
int idx)
|
||||
{
|
||||
struct net_bridge *br = netdev_priv(dev);
|
||||
|
|
@ -691,6 +692,10 @@ int br_fdb_dump(struct sk_buff *skb,
|
|||
if (idx < cb->args[0])
|
||||
goto skip;
|
||||
|
||||
if (filter_dev && (!f->dst || !f->dst->dev ||
|
||||
f->dst->dev != filter_dev))
|
||||
goto skip;
|
||||
|
||||
if (fdb_fill_info(skb, br, f,
|
||||
NETLINK_CB(cb->skb).portid,
|
||||
cb->nlh->nlmsg_seq,
|
||||
|
|
|
|||
|
|
@ -399,7 +399,7 @@ int br_fdb_delete(struct ndmsg *ndm, struct nlattr *tb[],
|
|||
int br_fdb_add(struct ndmsg *nlh, struct nlattr *tb[], struct net_device *dev,
|
||||
const unsigned char *addr, u16 nlh_flags);
|
||||
int br_fdb_dump(struct sk_buff *skb, struct netlink_callback *cb,
|
||||
struct net_device *dev, int idx);
|
||||
struct net_device *dev, struct net_device *fdev, int idx);
|
||||
int br_fdb_sync_static(struct net_bridge *br, struct net_bridge_port *p);
|
||||
void br_fdb_unsync_static(struct net_bridge *br, struct net_bridge_port *p);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue