summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2015-07-28 11:44:52 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2015-07-28 11:44:52 +0000
commit3beb0ebc0557abe69f04aa0d69f0133517cb5a49 (patch)
tree4c8a4a5e2ddbaf8e8b7eb85fe578806546571395
parent0a702c5ea0e333a781f44a7f6a2acc660a916d43 (diff)
iDo not link an ICMP6 socket to the pf state. When multiple ICMP
packets with a different ICMP ID are sent over the same raw socket, multiple states should be created. Put a similar check into rip6_output() like in the IPv4 case. OK mikeb@
-rw-r--r--sys/netinet6/raw_ip6.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netinet6/raw_ip6.c b/sys/netinet6/raw_ip6.c
index a0f8aa1a855..d5c7de72c70 100644
--- a/sys/netinet6/raw_ip6.c
+++ b/sys/netinet6/raw_ip6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: raw_ip6.c,v 1.77 2015/07/15 22:16:42 deraadt Exp $ */
+/* $OpenBSD: raw_ip6.c,v 1.78 2015/07/28 11:44:51 bluhm Exp $ */
/* $KAME: raw_ip6.c,v 1.69 2001/03/04 15:55:44 itojun Exp $ */
/*
@@ -475,7 +475,8 @@ rip6_output(struct mbuf *m, ...)
m->m_pkthdr.ph_rtableid = in6p->inp_rtableid;
#if NPF > 0
- if (in6p->inp_socket->so_state & SS_ISCONNECTED)
+ if (in6p->inp_socket->so_state & SS_ISCONNECTED &&
+ so->so_proto->pr_protocol != IPPROTO_ICMPV6)
m->m_pkthdr.pf.inp = in6p;
#endif