summaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2006-12-13 09:02:00 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2006-12-13 09:02:00 +0000
commit1822c03e0119506f93b0225555c4af71fc3ce813 (patch)
tree5cf8326ea2f1c375a679a416e63837ad3f37cc91 /sys/netinet
parent354e8d02c6c4fb134aabdd3235dda725dc4f4537 (diff)
use IN6_IS_SCOPE_EMBED to check kernel-internal form addresses
(s6_addr16[1] filled) ok dhartmei
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/ip_ah.c6
-rw-r--r--sys/netinet/ip_carp.c8
-rw-r--r--sys/netinet/ip_ipip.c6
3 files changed, 10 insertions, 10 deletions
diff --git a/sys/netinet/ip_ah.c b/sys/netinet/ip_ah.c
index d53ac8078f3..d5fb3c6fc5f 100644
--- a/sys/netinet/ip_ah.c
+++ b/sys/netinet/ip_ah.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ah.c,v 1.85 2006/05/28 02:04:15 mcbride Exp $ */
+/* $OpenBSD: ip_ah.c,v 1.86 2006/12/13 09:01:59 itojun Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr) and
@@ -364,9 +364,9 @@ ah_massage_headers(struct mbuf **m0, int proto, int skip, int alg, int out)
ip6.ip6_vfc |= IPV6_VERSION;
/* Scoped address handling. */
- if (IN6_IS_SCOPE_LINKLOCAL(&ip6.ip6_src))
+ if (IN6_IS_SCOPE_EMBED(&ip6.ip6_src))
ip6.ip6_src.s6_addr16[1] = 0;
- if (IN6_IS_SCOPE_LINKLOCAL(&ip6.ip6_dst))
+ if (IN6_IS_SCOPE_EMBED(&ip6.ip6_dst))
ip6.ip6_dst.s6_addr16[1] = 0;
/* Done with IPv6 header. */
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c
index 465ee2a93ee..61bd993ba19 100644
--- a/sys/netinet/ip_carp.c
+++ b/sys/netinet/ip_carp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_carp.c,v 1.131 2006/11/16 13:12:43 henning Exp $ */
+/* $OpenBSD: ip_carp.c,v 1.132 2006/12/13 09:01:59 itojun Exp $ */
/*
* Copyright (c) 2002 Michael Shalayeff. All rights reserved.
@@ -296,7 +296,7 @@ carp_hmac_prepare_ctx(struct carp_softc *sc, u_int8_t ctx)
memset(&cur6, 0xff, sizeof(cur6));
TAILQ_FOREACH(ifa, &sc->sc_if.if_addrlist, ifa_list) {
in6 = ifatoia6(ifa)->ia_addr.sin6_addr;
- if (IN6_IS_ADDR_LINKLOCAL(&in6)) {
+ if (IN6_IS_SCOPE_EMBED(&in6)) {
if (ctx == HMAC_NOV6LL)
continue;
in6.s6_addr16[1] = 0;
@@ -644,9 +644,9 @@ carp_proto_input_c(struct mbuf *m, struct carp_header *ch, sa_family_t af)
in6_src = ip6->ip6_src;
in6_found = ifatoia6(ifa)->ia_addr.sin6_addr;
- if (IN6_IS_ADDR_LINKLOCAL(&in6_src))
+ if (IN6_IS_SCOPE_EMBED(&in6_src))
in6_src.s6_addr16[1] = 0;
- if (IN6_IS_ADDR_LINKLOCAL(&in6_found))
+ if (IN6_IS_SCOPE_EMBED(&in6_found))
in6_found.s6_addr16[1] = 0;
if (IN6_ARE_ADDR_EQUAL(&in6_src, &in6_found)) {
m_freem(m);
diff --git a/sys/netinet/ip_ipip.c b/sys/netinet/ip_ipip.c
index 416501730a4..427f4214f1a 100644
--- a/sys/netinet/ip_ipip.c
+++ b/sys/netinet/ip_ipip.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ipip.c,v 1.37 2006/04/25 15:49:35 claudio Exp $ */
+/* $OpenBSD: ip_ipip.c,v 1.38 2006/12/13 09:01:59 itojun Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr) and
@@ -498,9 +498,9 @@ ipip_output(struct mbuf *m, struct tdb *tdb, struct mbuf **mp, int skip,
/* scoped address handling */
ip6 = mtod(m, struct ip6_hdr *);
- if (IN6_IS_SCOPE_LINKLOCAL(&ip6->ip6_src))
+ if (IN6_IS_SCOPE_EMBED(&ip6->ip6_src))
ip6->ip6_src.s6_addr16[1] = 0;
- if (IN6_IS_SCOPE_LINKLOCAL(&ip6->ip6_dst))
+ if (IN6_IS_SCOPE_EMBED(&ip6->ip6_dst))
ip6->ip6_dst.s6_addr16[1] = 0;
M_PREPEND(m, sizeof(struct ip6_hdr), M_DONTWAIT);