summaryrefslogtreecommitdiff
path: root/sys/netinet6
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2016-07-19 08:13:47 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2016-07-19 08:13:47 +0000
commit31e71f9db26a1cc42f452df44a0b085e2eb990c3 (patch)
treee58df0641f46e2dcbc91ecfccf1c572d55d31e87 /sys/netinet6
parent32dcc20d8689ce6519ec5ad22b99b7a1974d7553 (diff)
Use a flag to indicate that a packet has been received on an IPv6
anycast address. This will allow us to split ip6_input() in two parts using a queue in the middle. ok jca@, florian@, bluhm@
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/ip6_input.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c
index 882d660c77e..7d4966e980c 100644
--- a/sys/netinet6/ip6_input.c
+++ b/sys/netinet6/ip6_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip6_input.c,v 1.164 2016/07/18 19:50:49 bluhm Exp $ */
+/* $OpenBSD: ip6_input.c,v 1.165 2016/07/19 08:13:46 mpi Exp $ */
/* $KAME: ip6_input.c,v 1.188 2001/03/29 05:34:31 itojun Exp $ */
/*
@@ -197,7 +197,7 @@ ip6_input(struct mbuf *m)
#if NPF > 0
struct in6_addr odst;
#endif
- int srcrt = 0, isanycast = 0;
+ int srcrt = 0;
ifp = if_get(m->m_pkthdr.ph_ifidx);
if (ifp == NULL)
@@ -450,7 +450,7 @@ ip6_input(struct mbuf *m)
struct in6_ifaddr *ia6 =
ifatoia6(ip6_forward_rt.ro_rt->rt_ifa);
if (ia6->ia6_flags & IN6_IFF_ANYCAST)
- isanycast = 1;
+ m->m_flags |= M_ACAST;
/*
* packets to a tentative, duplicated, or somehow invalid
* address must not be accepted.
@@ -552,7 +552,7 @@ ip6_input(struct mbuf *m)
}
/* draft-itojun-ipv6-tcp-to-anycast */
- if (isanycast && nxt == IPPROTO_TCP) {
+ if (ISSET(m->m_flags, M_ACAST) && (nxt == IPPROTO_TCP)) {
if (m->m_len >= sizeof(struct ip6_hdr)) {
icmp6_error(m, ICMP6_DST_UNREACH,
ICMP6_DST_UNREACH_ADDR,