Skip to contentSkip to conversation

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

PATCH Applied Roopa Prabhu 2 participants 2 messages Jun 24, 2020 – Jun 25, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vxlan: fix last fdb index during dump of fdb with nhid

From: Roopa Prabhu <[email protected]>

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

Fixes 1274e1cc4226 ("vxlan: ecmp support for mac fdb entries")
---
 drivers/net/vxlan.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/net/vxlan.c +4 -0
index e8085ab..89d85dc 100644
@@ -1380,6 +1380,8 @@ static int vxlan_fdb_dump(struct sk_buff *skb, struct netlink_callback *cb,
 			struct vxlan_rdst *rd;
 
 			if (rcu_access_pointer(f->nh)) {
+				if (*idx < cb->args[2])
+					goto skip_nh;
 				err = vxlan_fdb_info(skb, vxlan, f,
 						     NETLINK_CB(cb->skb).portid,
 						     cb->nlh->nlmsg_seq,
@@ -1387,6 +1389,8 @@ static int vxlan_fdb_dump(struct sk_buff *skb, struct netlink_callback *cb,
 						     NLM_F_MULTI, NULL);
 				if (err < 0)
 					goto out;
+skip_nh:
+				*idx += 1;
 				continue;
 			}
 
Signature · 1 line
2.1.4