mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 10:19:26 +00:00
Don't have -prefixlen 128 on host routes.
Obtained from: KAME
This commit is contained in:
parent
b2f3846aef
commit
56c5d32d37
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=98053
@ -884,15 +884,13 @@ inet6_makenetandmask(sin6, plen)
|
|||||||
if (!memcmp(&sin6->sin6_addr.s6_addr[8],
|
if (!memcmp(&sin6->sin6_addr.s6_addr[8],
|
||||||
&in6.s6_addr[8], 8))
|
&in6.s6_addr[8], 8))
|
||||||
plen = "64";
|
plen = "64";
|
||||||
else
|
|
||||||
plen = "128";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (plen) {
|
if (!plen || strcmp(plen, "128") == 0)
|
||||||
rtm_addrs |= RTA_NETMASK;
|
return 1;
|
||||||
return prefixlen(plen);
|
rtm_addrs |= RTA_NETMASK;
|
||||||
}
|
(void)prefixlen(plen);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -1029,8 +1027,7 @@ getaddr(which, s, hpp)
|
|||||||
if (q != NULL)
|
if (q != NULL)
|
||||||
*q++ = '/';
|
*q++ = '/';
|
||||||
if (which == RTA_DST)
|
if (which == RTA_DST)
|
||||||
if (inet6_makenetandmask(&su->sin6, q) == -1)
|
return (inet6_makenetandmask(&su->sin6, q));
|
||||||
return (1);
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
#endif /* INET6 */
|
#endif /* INET6 */
|
||||||
|
Loading…
Reference in New Issue
Block a user