mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 12:42:02 +00:00
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: dc599f76c2
("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>
This commit is contained in:
parent
32c231164b
commit
3f0ae05d6f
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user