Skip to content

Commit

Permalink
[BRIDGE]: br_dump_ifinfo index fix
Browse files Browse the repository at this point in the history
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: Andrey Savochkin <saw@swsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Andrey Savochkin authored and David S. Miller committed Jul 4, 2006
1 parent 3c6b377 commit 69ee20a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/bridge/br_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 69ee20a

Please sign in to comment.