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 /sbin | |
parent | ad51cf1ba54ab885b163aac67843aa7cd0c65973 (diff) |
Add missing __KAME__ markers.
OK claudio
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/route/route.c | 4 | ||||
-rw-r--r-- | sbin/route/show.c | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/sbin/route/route.c b/sbin/route/route.c index 9130b9ff692..ed70dbd427b 100644 --- a/sbin/route/route.c +++ b/sbin/route/route.c @@ -1,4 +1,4 @@ -/* $OpenBSD: route.c,v 1.251 2020/12/29 19:50:51 benno Exp $ */ +/* $OpenBSD: route.c,v 1.252 2021/01/24 08:58:50 florian Exp $ */ /* $NetBSD: route.c,v 1.16 1996/04/15 18:27:05 cgd Exp $ */ /* @@ -974,6 +974,7 @@ getaddr(int which, int af, char *s, struct hostent **hpp) errx(1, "%s: resolved to multiple values", s); memcpy(&su->sin6, res->ai_addr, sizeof(su->sin6)); freeaddrinfo(res); +#ifdef __KAME__ if ((IN6_IS_ADDR_LINKLOCAL(&su->sin6.sin6_addr) || IN6_IS_ADDR_MC_LINKLOCAL(&su->sin6.sin6_addr) || IN6_IS_ADDR_MC_INTFACELOCAL(&su->sin6.sin6_addr)) && @@ -982,6 +983,7 @@ getaddr(int which, int af, char *s, struct hostent **hpp) htons(su->sin6.sin6_scope_id); su->sin6.sin6_scope_id = 0; } +#endif if (hints.ai_flags == AI_NUMERICHOST) { if (which == RTA_DST) { if (sep == NULL && su->sin6.sin6_scope_id == 0 && diff --git a/sbin/route/show.c b/sbin/route/show.c index 15b9a12503a..ff794e0a273 100644 --- a/sbin/route/show.c +++ b/sbin/route/show.c @@ -1,4 +1,4 @@ -/* $OpenBSD: show.c,v 1.117 2021/01/16 17:41:20 claudio Exp $ */ +/* $OpenBSD: show.c,v 1.118 2021/01/24 08:58:50 florian Exp $ */ /* $NetBSD: show.c,v 1.1 1996/11/15 18:01:41 gwr Exp $ */ /* @@ -386,6 +386,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; /* @@ -401,6 +402,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 @@ -493,6 +495,7 @@ routename(struct sockaddr *sa) memcpy(&sin6, sa, sa->sa_len); sin6.sin6_len = sizeof(struct sockaddr_in6); 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) || @@ -503,6 +506,7 @@ routename(struct sockaddr *sa) sin6.sin6_addr.s6_addr[2] = 0; sin6.sin6_addr.s6_addr[3] = 0; } +#endif return (routename6(&sin6)); } |