From: Brian Haley <brian.haley@hp.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: [PATCH] IPv6: only set err in rawv6_bind() when necessary
Date: Tue, 01 Aug 2006 13:06:03 -0400 [thread overview]
Message-ID: <44CF89FB.2060208@hp.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 170 bytes --]
The variable 'err' is set in rawv6_bind() before the address check fails
instead of after, moved inside if() statement.
Signed-off-by: Brian Haley <brian.haley@hp.com>
[-- Attachment #2: raw.patch --]
[-- Type: text/x-patch, Size: 425 bytes --]
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
index 8a30cd8..072b28b 100644
--- a/net/ipv6/raw.c
+++ b/net/ipv6/raw.c
@@ -240,10 +240,10 @@ static int rawv6_bind(struct sock *sk, s
*/
v4addr = LOOPBACK4_IPV6;
if (!(addr_type & IPV6_ADDR_MULTICAST)) {
- err = -EADDRNOTAVAIL;
if (!ipv6_chk_addr(&addr->sin6_addr, dev, 0)) {
if (dev)
dev_put(dev);
+ err = -EADDRNOTAVAIL;
goto out;
}
}
next reply other threads:[~2006-08-01 17:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-01 17:06 Brian Haley [this message]
2006-08-01 22:03 ` [PATCH] IPv6: only set err in rawv6_bind() when necessary David Miller
2006-08-02 16:04 ` Brian Haley
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=44CF89FB.2060208@hp.com \
--to=brian.haley@hp.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).