From: Jens Rosenboom <me@jayr.de>
To: Linux Network Developers <netdev@vger.kernel.org>
Subject: [PATCH net-next] ipv6: Ignore route option with ROUTER_PREF_INVALID
Date: Thu, 10 Sep 2009 18:25:11 +0200 [thread overview]
Message-ID: <1252599911.5980.16.camel@fnki-nb00130> (raw)
RFC4191 says that "If the Reserved (10) value is received, the Route
Information Option MUST be ignored.", so this patch makes us conform
to the RFC. This is different to the usage of the Default Router
Preference, where an invalid value must indeed be treated as
PREF_MEDIUM.
Signed-off-by: Jens Rosenboom <me@jayr.de>
---
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 1473ee0..f3635b7 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -481,7 +481,7 @@ int rt6_route_rcv(struct net_device *dev, u8 *opt,
int len,
pref = rinfo->route_pref;
if (pref == ICMPV6_ROUTER_PREF_INVALID)
- pref = ICMPV6_ROUTER_PREF_MEDIUM;
+ return -EINVAL;
lifetime = addrconf_timeout_fixup(ntohl(rinfo->lifetime), HZ);
next reply other threads:[~2009-09-10 16:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-10 16:25 Jens Rosenboom [this message]
2009-09-17 0:12 ` [PATCH net-next] ipv6: Ignore route option with ROUTER_PREF_INVALID 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=1252599911.5980.16.camel@fnki-nb00130 \
--to=me@jayr.de \
--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