summaryrefslogtreecommitdiffstats
path: root/sys/netinet6
diff options
context:
space:
mode:
authorsuz <suz@FreeBSD.org>2006-03-19 06:38:39 +0000
committersuz <suz@FreeBSD.org>2006-03-19 06:38:39 +0000
commit64762b215dbcd71d5d2a1e15d5286333b65af33a (patch)
tree7038a79689664cad0400eb2a82a9fe69a564326a /sys/netinet6
parent90b657b795dbd89c334fffa27d9bad2d181bd2ca (diff)
downloadFreeBSD-src-64762b215dbcd71d5d2a1e15d5286333b65af33a.zip
FreeBSD-src-64762b215dbcd71d5d2a1e15d5286333b65af33a.tar.gz
implements section 2.2 of RFC4191, regarding the reserved preference value (10)
Obtained from: KAME MFC after: 1 day
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/nd6_rtr.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/sys/netinet6/nd6_rtr.c b/sys/netinet6/nd6_rtr.c
index 3738ada..119a422 100644
--- a/sys/netinet6/nd6_rtr.c
+++ b/sys/netinet6/nd6_rtr.c
@@ -270,16 +270,7 @@ nd6_ra_input(m, off, icmp6len)
bzero(&dr0, sizeof(dr0));
dr0.rtaddr = saddr6;
dr0.flags = nd_ra->nd_ra_flags_reserved;
- if (rtpref(&dr0) == RTPREF_RESERVED) {
- /*
- * "reserved" router preference should be treated as
- * 0-lifetime. Note that rtpref() covers the case that the
- * kernel is not configured to support the preference
- * extension.
- */
- dr0.rtlifetime = 0;
- } else
- dr0.rtlifetime = ntohs(nd_ra->nd_ra_router_lifetime);
+ dr0.rtlifetime = ntohs(nd_ra->nd_ra_router_lifetime);
dr0.expire = time_second + dr0.rtlifetime;
dr0.ifp = ifp;
/* unspecified or not? (RFC 2461 6.3.4) */
@@ -720,9 +711,8 @@ rtpref(struct nd_defrouter *dr)
case ND_RA_FLAG_RTPREF_HIGH:
return (RTPREF_HIGH);
case ND_RA_FLAG_RTPREF_MEDIUM:
- return (RTPREF_MEDIUM);
case ND_RA_FLAG_RTPREF_RSV:
- return (RTPREF_RESERVED);
+ return (RTPREF_MEDIUM);
case ND_RA_FLAG_RTPREF_LOW:
return (RTPREF_LOW);
default:
OpenPOWER on IntegriCloud