svn commit: r201543 - head/sys/netinet6
Qing Li
qingli at FreeBSD.org
Mon Jan 4 23:39:53 UTC 2010
Author: qingli
Date: Mon Jan 4 23:39:53 2010
New Revision: 201543
URL: http://svn.freebsd.org/changeset/base/201543
Log:
The IFA_RTSELF address flag marks a loopback route has been installed
for the interface address. This marker is necessary to properly support
PPP types of links where multiple links can have the same local end
IP address. The IFA_RTSELF flag bit maps to the RTF_HOST value, which
was combined into the route flag bits during prefix installation in
IPv6. This inclusion causing the prefix route to be unusable. This
patch fixes this bug by excluding the IFA_RTSELF flag during route
installation.
MFC after: 5 days
Modified:
head/sys/netinet6/nd6_rtr.c
Modified: head/sys/netinet6/nd6_rtr.c
==============================================================================
--- head/sys/netinet6/nd6_rtr.c Mon Jan 4 22:57:33 2010 (r201542)
+++ head/sys/netinet6/nd6_rtr.c Mon Jan 4 23:39:53 2010 (r201543)
@@ -1629,7 +1629,7 @@ nd6_prefix_onlink(struct nd_prefix *pr)
bzero(&mask6, sizeof(mask6));
mask6.sin6_len = sizeof(mask6);
mask6.sin6_addr = pr->ndpr_mask;
- rtflags = ifa->ifa_flags | RTF_UP;
+ rtflags = (ifa->ifa_flags & ~IFA_RTSELF) | RTF_UP;
error = rtrequest(RTM_ADD, (struct sockaddr *)&pr->ndpr_prefix,
ifa->ifa_addr, (struct sockaddr *)&mask6, rtflags, &rt);
if (error == 0) {
More information about the svn-src-head
mailing list