Skip to contentSkip to conversation

bridge: br_dump_ifinfo index fix

PATCH Applied Andrey Savochkin 2 participants 2 messages Jul 3, 2006 – Jul 4, 2006

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
Against 2.6.17-mm6

net/bridge/br_netlink.c renamed from net/bridge/br_netlink.c.vebridge-dump +2 -1
@@ -117,12 +117,13 @@ static int br_dump_ifinfo(struct sk_buff
 			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);