aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorJens Rosenboom <me@jayr.de>2009-09-10 02:25:11 -0400
committerDavid S. Miller <davem@davemloft.net>2009-09-16 20:10:38 -0400
commit3933fc952a5a5af4cf23fca94e20203251c9d825 (patch)
tree512d4c2386a0bff8fe7b2fa92dbac77617555990 /net/ipv6
parentb9f602533e2f5c32a09a3a75904e5373cb6e6377 (diff)
ipv6: Ignore route option with ROUTER_PREF_INVALID
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> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/route.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 9ccfef345560..77aecbe8ff6c 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,
481 481
482 pref = rinfo->route_pref; 482 pref = rinfo->route_pref;
483 if (pref == ICMPV6_ROUTER_PREF_INVALID) 483 if (pref == ICMPV6_ROUTER_PREF_INVALID)
484 pref = ICMPV6_ROUTER_PREF_MEDIUM; 484 return -EINVAL;
485 485
486 lifetime = addrconf_timeout_fixup(ntohl(rinfo->lifetime), HZ); 486 lifetime = addrconf_timeout_fixup(ntohl(rinfo->lifetime), HZ);
487 487