Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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);