Commit 69ee20a5 authored by Andrey Savochkin's avatar Andrey Savochkin Committed by David S. Miller
Browse files

[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: default avatarAndrey Savochkin <saw@swsoft.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3c6b3773
...@@ -117,12 +117,13 @@ static int br_dump_ifinfo(struct sk_buff *skb, struct netlink_callback *cb) ...@@ -117,12 +117,13 @@ static int br_dump_ifinfo(struct sk_buff *skb, struct netlink_callback *cb)
continue; continue;
if (idx < s_idx) if (idx < s_idx)
continue; goto cont;
err = br_fill_ifinfo(skb, p, NETLINK_CB(cb->skb).pid, err = br_fill_ifinfo(skb, p, NETLINK_CB(cb->skb).pid,
cb->nlh->nlmsg_seq, RTM_NEWLINK, NLM_F_MULTI); cb->nlh->nlmsg_seq, RTM_NEWLINK, NLM_F_MULTI);
if (err <= 0) if (err <= 0)
break; break;
cont:
++idx; ++idx;
} }
read_unlock(&dev_base_lock); read_unlock(&dev_base_lock);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment