Skip to content

Commit

Permalink
vxlan: fix fdb_dump index calculation
Browse files Browse the repository at this point in the history
When too many remotes are bound to an FDB entry, index may not be increased.
This problem will be caused on the large scale environment that is based on
the unicast default destination, for instance.

Signed-off-by: Atzm Watanabe <atzm@iij.ad.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Atzm Watanabe authored and David S. Miller committed Aug 11, 2015
1 parent ed8db18 commit 07a51cd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drivers/net/vxlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -931,20 +931,20 @@ static int vxlan_fdb_dump(struct sk_buff *skb, struct netlink_callback *cb,
hlist_for_each_entry_rcu(f, &vxlan->fdb_head[h], hlist) {
struct vxlan_rdst *rd;

if (idx < cb->args[0])
goto skip;

list_for_each_entry_rcu(rd, &f->remotes, list) {
if (idx < cb->args[0])
goto skip;

err = vxlan_fdb_info(skb, vxlan, f,
NETLINK_CB(cb->skb).portid,
cb->nlh->nlmsg_seq,
RTM_NEWNEIGH,
NLM_F_MULTI, rd);
if (err < 0)
goto out;
}
skip:
++idx;
++idx;
}
}
}
out:
Expand Down

0 comments on commit 07a51cd

Please sign in to comment.