summaryrefslogtreecommitdiffstats
path: root/drivers/net/vxlan.c
diff options
context:
space:
mode:
authorMINOURA Makoto / 箕浦 真 <minoura@valinux.co.jp>2016-02-25 14:20:48 +0900
committerDavid S. Miller <davem@davemloft.net>2016-02-26 15:04:02 -0500
commit472681d57a5dde7c6d16b05469be57f1c4ed9d99 (patch)
tree2163ac3883c3c89c2a77abc356139edac189d966 /drivers/net/vxlan.c
parent4c0b6eaf373a5323f03a3a20c42fc435715b073d (diff)
downloadlinux-472681d57a5dde7c6d16b05469be57f1c4ed9d99.tar.bz2
net: ndo_fdb_dump should report -EMSGSIZE to rtnl_fdb_dump.
When the send skbuff reaches the end, nlmsg_put and friends returns -EMSGSIZE but it is silently thrown away in ndo_fdb_dump. It is called within a for_each_netdev loop and the first fdb entry of a following netdev could fit in the remaining skbuff. This breaks the mechanism of cb->args[0] and idx to keep track of the entries that are already dumped, which results missing entries in bridge fdb show command. Signed-off-by: Minoura Makoto <minoura@valinux.co.jp> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/vxlan.c')
-rw-r--r--drivers/net/vxlan.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index e6944b29588e..b601139a145a 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -931,8 +931,10 @@ static int vxlan_fdb_dump(struct sk_buff *skb, struct netlink_callback *cb,
cb->nlh->nlmsg_seq,
RTM_NEWNEIGH,
NLM_F_MULTI, rd);
- if (err < 0)
+ if (err < 0) {
+ cb->args[1] = err;
goto out;
+ }
skip:
++idx;
}