Date: Mon, 4 Jan 2010 23:39:53 +0000 (UTC) From: Qing Li <qingli@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r201543 - head/sys/netinet6 Message-ID: <201001042339.o04NdrYp015685@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001042339.o04NdrYp015685>