aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge/br_netlink.c
diff options
context:
space:
mode:
authorAndrey Savochkin <saw@swsoft.com>2006-07-03 22:50:14 -0400
committerDavid S. Miller <davem@davemloft.net>2006-07-03 22:50:14 -0400
commit69ee20a58fa0cad6520c2a9538100a87ef0abd7d (patch)
tree3045353c484b04b1ff38a6650085415a9a9b046b /net/bridge/br_netlink.c
parent3c6b377321678c649f9b3c66da0149975c614102 (diff)
[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: Andrey Savochkin <saw@swsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_netlink.c')
-rw-r--r--net/bridge/br_netlink.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c
index 881d7d1a732a..06abb6634f5b 100644
--- a/net/bridge/br_netlink.c
+++ b/net/bridge/br_netlink.c
@@ -117,12 +117,13 @@ static int br_dump_ifinfo(struct sk_buff *skb, struct netlink_callback *cb)
117 continue; 117 continue;
118 118
119 if (idx < s_idx) 119 if (idx < s_idx)
120 continue; 120 goto cont;
121 121
122 err = br_fill_ifinfo(skb, p, NETLINK_CB(cb->skb).pid, 122 err = br_fill_ifinfo(skb, p, NETLINK_CB(cb->skb).pid,
123 cb->nlh->nlmsg_seq, RTM_NEWLINK, NLM_F_MULTI); 123 cb->nlh->nlmsg_seq, RTM_NEWLINK, NLM_F_MULTI);
124 if (err <= 0) 124 if (err <= 0)
125 break; 125 break;
126cont:
126 ++idx; 127 ++idx;
127 } 128 }
128 read_unlock(&dev_base_lock); 129 read_unlock(&dev_base_lock);