summaryrefslogtreecommitdiffstats
path: root/sys/netinet6
diff options
context:
space:
mode:
authorqingli <qingli@FreeBSD.org>2010-01-04 23:39:53 +0000
committerqingli <qingli@FreeBSD.org>2010-01-04 23:39:53 +0000
commita506bcc1c47ba8270fca36d4e3c5f3eee9c65cb2 (patch)
tree9560006e234c5efa0a55ae62810e7fcd1613caba /sys/netinet6
parent9329eaed58f97a582af35680e9a0b4e5cfecf78a (diff)
downloadFreeBSD-src-a506bcc1c47ba8270fca36d4e3c5f3eee9c65cb2.zip
FreeBSD-src-a506bcc1c47ba8270fca36d4e3c5f3eee9c65cb2.tar.gz
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
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/nd6_rtr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netinet6/nd6_rtr.c b/sys/netinet6/nd6_rtr.c
index 23be4c5..74f4954 100644
--- a/sys/netinet6/nd6_rtr.c
+++ b/sys/netinet6/nd6_rtr.c
@@ -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) {
OpenPOWER on IntegriCloud