[BRIDGE]: br_dump_ifinfo index fix
authorAndrey Savochkin <saw@swsoft.com>
Tue, 4 Jul 2006 02:50:14 +0000 (19:50 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 4 Jul 2006 02:50:14 +0000 (19:50 -0700)
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>
net/bridge/br_netlink.c

index 881d7d1a732a884faa01873922364ca9a23862b7..06abb6634f5be777a374c389b1d4778cb79ee210 100644 (file)
@@ -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);