From: Willem Jan Withagen Date: Fri, 30 Mar 2018 14:53:48 +0000 (+0200) Subject: common: FreeBSD wants the correct struct selection for ipv6 X-Git-Tag: v12.2.5~74^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d3067335208f290218a41c813b682fb7babbd692;p=ceph.git common: FreeBSD wants the correct struct selection for ipv6 Lets see if this also works for Linux Fixes: http://tracker.ceph.com/issues/21813 Signed-off-by: Willem Jan Withagen (cherry picked from commit 3806d8ec7c145d0239c94fc5b601d460b36757a5) --- diff --git a/src/common/ipaddr.cc b/src/common/ipaddr.cc index 27b9cdff2b16..c880bfd402e8 100644 --- a/src/common/ipaddr.cc +++ b/src/common/ipaddr.cc @@ -90,6 +90,8 @@ const struct ifaddrs *find_ipv6_in_subnet(const struct ifaddrs *addrs, continue; struct in6_addr *cur = &((struct sockaddr_in6*)addrs->ifa_addr)->sin6_addr; + if (IN6_IS_ADDR_LINKLOCAL(cur)) + continue; netmask_ipv6(cur, prefix_len, &temp); if (IN6_ARE_ADDR_EQUAL(&temp, &want))