diff options
author | Florian Obser <florian@cvs.openbsd.org> | 2021-01-24 08:58:51 +0000 |
---|---|---|
committer | Florian Obser <florian@cvs.openbsd.org> | 2021-01-24 08:58:51 +0000 |
commit | 046f84f79d8bf60ccbc90c5804a2cf2e9d26b833 (patch) | |
tree | 7c6b85b099de568a487a77e1a95b5f7fad6652b9 /usr.bin/netstat | |
parent | ad51cf1ba54ab885b163aac67843aa7cd0c65973 (diff) |
Add missing __KAME__ markers.
OK claudio
Diffstat (limited to 'usr.bin/netstat')
-rw-r--r-- | usr.bin/netstat/show.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/netstat/show.c b/usr.bin/netstat/show.c index 8949c00deec..968428d29a3 100644 --- a/usr.bin/netstat/show.c +++ b/usr.bin/netstat/show.c @@ -1,4 +1,4 @@ -/* $OpenBSD: show.c,v 1.57 2021/01/16 17:42:52 claudio Exp $ */ +/* $OpenBSD: show.c,v 1.58 2021/01/24 08:58:50 florian Exp $ */ /* $NetBSD: show.c,v 1.1 1996/11/15 18:01:41 gwr Exp $ */ /* @@ -335,6 +335,7 @@ p_sockaddr(struct sockaddr *sa, struct sockaddr *mask, int flags, int width) case AF_INET6: { struct sockaddr_in6 *sa6 = (struct sockaddr_in6 *)sa; +#ifdef __KAME__ struct in6_addr *in6 = &sa6->sin6_addr; /* @@ -350,6 +351,7 @@ p_sockaddr(struct sockaddr *sa, struct sockaddr *mask, int flags, int width) &in6->s6_addr[2]); *(u_short *)&in6->s6_addr[2] = 0; } +#endif if (flags & RTF_HOST) cp = routename((struct sockaddr *)sa6); else @@ -441,6 +443,7 @@ routename(struct sockaddr *sa) memset(&sin6, 0, sizeof(sin6)); memcpy(&sin6, sa, sa->sa_len); sin6.sin6_family = AF_INET6; +#ifdef __KAME__ if (sa->sa_len == sizeof(struct sockaddr_in6) && (IN6_IS_ADDR_LINKLOCAL(&sin6.sin6_addr) || IN6_IS_ADDR_MC_LINKLOCAL(&sin6.sin6_addr) || @@ -451,6 +454,7 @@ routename(struct sockaddr *sa) sin6.sin6_addr.s6_addr[2] = 0; sin6.sin6_addr.s6_addr[3] = 0; } +#endif return (routename6(&sin6)); } |