summaryrefslogtreecommitdiffstats
path: root/net/core/rtnetlink.c
diff options
context:
space:
mode:
authorZhang Shengju <zhangshengju@cmss.chinamobile.com>2016-11-19 16:28:32 +0100
committerDavid S. Miller <davem@davemloft.net>2016-11-20 04:14:30 +0100
commit3f0ae05d6fea0ed5b19efdbc9c9f8e02685a3af3 (patch)
tree65e524a6741b5b70644959f7249b39b63aff7e30 /net/core/rtnetlink.c
parentl2tp: fix racy SOCK_ZAPPED flag check in l2tp_ip{,6}_bind() (diff)
downloadlinux-3f0ae05d6fea0ed5b19efdbc9c9f8e02685a3af3.tar.xz
linux-3f0ae05d6fea0ed5b19efdbc9c9f8e02685a3af3.zip
rtnl: fix the loop index update error in rtnl_dump_ifinfo()
If the link is filtered out, loop index should also be updated. If not, loop index will not be correct. Fixes: dc599f76c22b0 ("net: Add support for filtering link dump by master device and kind") Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com> Acked-by: David Ahern <dsa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--net/core/rtnetlink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 2b9d7d08ed4d..a99917b5de33 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -1609,7 +1609,7 @@ static int rtnl_dump_ifinfo(struct sk_buff *skb, struct netlink_callback *cb)
head = &net->dev_index_head[h];
hlist_for_each_entry(dev, head, index_hlist) {
if (link_dump_filtered(dev, master_idx, kind_ops))
- continue;
+ goto cont;
if (idx < s_idx)
goto cont;
err = rtnl_fill_ifinfo(skb, dev, RTM_NEWLINK,