Netdev List
 help / color / mirror / Atom feed
From: Andrey Savochkin <saw@swsoft.com>
To: netdev@vger.kernel.org
Cc: Kirill Korotaev <dev@openvz.org>,
	Ben Greear <greearb@candelatech.com>,
	Stephen Hemminger <shemminger@osdl.org>
Subject: [patch] bridge: br_dump_ifinfo index fix
Date: Mon, 3 Jul 2006 16:06:40 +0400	[thread overview]
Message-ID: <20060703160640.A15611@castle.nmd.msu.ru> (raw)

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>
Cc: Kirill Korotaev <dev@openvz.org>
---
Against 2.6.17-mm6

--- ./net/bridge/br_netlink.c.vebridge-dump	Wed Jun 21 18:53:18 2006
+++ ./net/bridge/br_netlink.c	Mon Jul  3 14:31:03 2006
@@ -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);

             reply	other threads:[~2006-07-03 12:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-03 12:06 Andrey Savochkin [this message]
2006-07-04  2:50 ` [patch] bridge: br_dump_ifinfo index fix David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060703160640.A15611@castle.nmd.msu.ru \
    --to=saw@swsoft.com \
    --cc=dev@openvz.org \
    --cc=greearb@candelatech.com \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox