svn commit: r196152 - head/sys/netinet6
Qing Li
qingli at FreeBSD.org
Wed Aug 12 19:15:28 UTC 2009
Author: qingli
Date: Wed Aug 12 19:15:26 2009
New Revision: 196152
URL: http://svn.freebsd.org/changeset/base/196152
Log:
A piece of code was added to install a host route when an IPv6 interface
address is configured with a /128 prefix. This is no longer necessary due
to r192011. In fact that code conflicts with r192011. This patch removes
the host route installation when detecting the /128 prefix, and instead
let the code added by r192011 to install the loopback route for that IPv6
interface address.
Reviewed by: bz
Approved by: re
Modified:
head/sys/netinet6/in6.c
Modified: head/sys/netinet6/in6.c
==============================================================================
--- head/sys/netinet6/in6.c Wed Aug 12 17:45:55 2009 (r196151)
+++ head/sys/netinet6/in6.c Wed Aug 12 19:15:26 2009 (r196152)
@@ -1750,21 +1750,12 @@ in6_ifinit(struct ifnet *ifp, struct in6
* interface that share the same destination.
*/
plen = in6_mask2len(&ia->ia_prefixmask.sin6_addr, NULL); /* XXX */
- if (!(ia->ia_flags & IFA_ROUTE) && plen == 128) {
- struct sockaddr *dstaddr;
+ if (!(ia->ia_flags & IFA_ROUTE) && plen == 128 &&
+ ia->ia_dstaddr.sin6_family == AF_INET6) {
int rtflags = RTF_UP | RTF_HOST;
- /*
- * use the interface address if configuring an
- * interface address with a /128 prefix len
- */
- if (ia->ia_dstaddr.sin6_family == AF_INET6)
- dstaddr = (struct sockaddr *)&ia->ia_dstaddr;
- else
- dstaddr = (struct sockaddr *)&ia->ia_addr;
-
error = rtrequest(RTM_ADD,
- (struct sockaddr *)dstaddr,
+ (struct sockaddr *)&ia->ia_dstaddr,
(struct sockaddr *)&ia->ia_addr,
(struct sockaddr *)&ia->ia_prefixmask,
ia->ia_flags | rtflags, NULL);
More information about the svn-src-head
mailing list