mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-23 16:01:42 +00:00
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
This commit is contained in:
parent
a36599cce7
commit
09b0354839
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=196152
@ -1750,21 +1750,12 @@ in6_ifinit(struct ifnet *ifp, struct in6_ifaddr *ia,
|
||||
* 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);
|
||||
|
Loading…
Reference in New Issue
Block a user