Commit b18e9834 authored by Roopa Prabhu's avatar Roopa Prabhu Committed by David S. Miller

vxlan: fix last fdb index during dump of fdb with nhid

This patch fixes last saved fdb index in fdb dump handler when
handling fdb's with nhid.

Fixes: 1274e1cc ("vxlan: ecmp support for mac fdb entries")
Signed-off-by: default avatarRoopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 471e39df
...@@ -1380,6 +1380,8 @@ static int vxlan_fdb_dump(struct sk_buff *skb, struct netlink_callback *cb, ...@@ -1380,6 +1380,8 @@ static int vxlan_fdb_dump(struct sk_buff *skb, struct netlink_callback *cb,
struct vxlan_rdst *rd; struct vxlan_rdst *rd;
if (rcu_access_pointer(f->nh)) { if (rcu_access_pointer(f->nh)) {
if (*idx < cb->args[2])
goto skip_nh;
err = vxlan_fdb_info(skb, vxlan, f, err = vxlan_fdb_info(skb, vxlan, f,
NETLINK_CB(cb->skb).portid, NETLINK_CB(cb->skb).portid,
cb->nlh->nlmsg_seq, cb->nlh->nlmsg_seq,
...@@ -1387,6 +1389,8 @@ static int vxlan_fdb_dump(struct sk_buff *skb, struct netlink_callback *cb, ...@@ -1387,6 +1389,8 @@ static int vxlan_fdb_dump(struct sk_buff *skb, struct netlink_callback *cb,
NLM_F_MULTI, NULL); NLM_F_MULTI, NULL);
if (err < 0) if (err < 0)
goto out; goto out;
skip_nh:
*idx += 1;
continue; continue;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment