* [PATCH net-next] ipv6: Ignore route option with ROUTER_PREF_INVALID
@ 2009-09-10 16:25 Jens Rosenboom
2009-09-17 0:12 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Jens Rosenboom @ 2009-09-10 16:25 UTC (permalink / raw)
To: Linux Network Developers
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);
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-09-17 0:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-10 16:25 [PATCH net-next] ipv6: Ignore route option with ROUTER_PREF_INVALID Jens Rosenboom
2009-09-17 0:12 ` David Miller
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).