提交 69ee20a5 编写于 作者: A Andrey Savochkin 提交者: David S. Miller

[BRIDGE]: br_dump_ifinfo index fix

Fix for inability of br_dump_ifinfo to handle non-zero start index:
loop index never increases when entered with non-zero start.
Spotted by Kirill Korotaev.
Signed-off-by: NAndrey Savochkin <saw@swsoft.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 3c6b3773
......@@ -117,12 +117,13 @@ static int br_dump_ifinfo(struct sk_buff *skb, struct netlink_callback *cb)
continue;
if (idx < s_idx)
continue;
goto cont;
err = br_fill_ifinfo(skb, p, NETLINK_CB(cb->skb).pid,
cb->nlh->nlmsg_seq, RTM_NEWLINK, NLM_F_MULTI);
if (err <= 0)
break;
cont:
++idx;
}
read_unlock(&dev_base_lock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册