Commit 3933fc95 authored by Jens Rosenboom's avatar Jens Rosenboom Committed by David S. Miller

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: default avatarJens Rosenboom <me@jayr.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b9f60253
...@@ -481,7 +481,7 @@ int rt6_route_rcv(struct net_device *dev, u8 *opt, int len, ...@@ -481,7 +481,7 @@ int rt6_route_rcv(struct net_device *dev, u8 *opt, int len,
pref = rinfo->route_pref; pref = rinfo->route_pref;
if (pref == ICMPV6_ROUTER_PREF_INVALID) if (pref == ICMPV6_ROUTER_PREF_INVALID)
pref = ICMPV6_ROUTER_PREF_MEDIUM; return -EINVAL;
lifetime = addrconf_timeout_fixup(ntohl(rinfo->lifetime), HZ); lifetime = addrconf_timeout_fixup(ntohl(rinfo->lifetime), HZ);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment