From: "Maciej Żenczykowski" <maze@google.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: regression: Apparently missing err assignment in ipv6 bind
Date: Thu, 27 Aug 2009 08:16:40 -0700 [thread overview]
Message-ID: <6897af6d0908270816w5ee81dd5j98bd11fe1d49479d@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 266 bytes --]
AFAICT, 2.6.30.5 and 2.6.31-rc7 both include a change in net/ipv6/af_inet6.c
http://lxr.linux.no/linux+v2.6.30.5/net/ipv6/af_inet6.c#L298
which results in a possible error return path with no err assignment.
I believe the error should be EADDRNOTAVAIL.
-- Maciej
[-- Attachment #2: bindv6err-2.6.30.5.patch --]
[-- Type: text/x-patch, Size: 492 bytes --]
--- linux-2.6.30.5/net/ipv6/af_inet6.c_ 2009-06-09 20:05:27.000000000 -0700
+++ linux-2.6.30.5/net/ipv6/af_inet6.c 2009-08-27 08:05:37.000000000 -0700
@@ -294,8 +294,10 @@
v4addr != htonl(INADDR_ANY) &&
chk_addr_ret != RTN_LOCAL &&
chk_addr_ret != RTN_MULTICAST &&
- chk_addr_ret != RTN_BROADCAST)
+ chk_addr_ret != RTN_BROADCAST) {
+ err = -EADDRNOTAVAIL;
goto out;
+ }
} else {
if (addr_type != IPV6_ADDR_ANY) {
struct net_device *dev = NULL;
[-- Attachment #3: bindv6err-2.6.31-rc7.patch --]
[-- Type: text/x-patch, Size: 496 bytes --]
--- linux-2.6.31-rc7/net/ipv6/af_inet6.c_ 2009-08-27 08:02:22.000000000 -0700
+++ linux-2.6.31-rc7/net/ipv6/af_inet6.c 2009-08-27 08:07:16.000000000 -0700
@@ -306,8 +306,10 @@
v4addr != htonl(INADDR_ANY) &&
chk_addr_ret != RTN_LOCAL &&
chk_addr_ret != RTN_MULTICAST &&
- chk_addr_ret != RTN_BROADCAST)
+ chk_addr_ret != RTN_BROADCAST) {
+ err = -EADDRNOTAVAIL;
goto out;
+ }
} else {
if (addr_type != IPV6_ADDR_ANY) {
struct net_device *dev = NULL;
next reply other threads:[~2009-08-27 15:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-27 15:16 Maciej Żenczykowski [this message]
2009-08-27 20:12 ` regression: Apparently missing err assignment in ipv6 bind 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=6897af6d0908270816w5ee81dd5j98bd11fe1d49479d@mail.gmail.com \
--to=maze@google.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