summaryrefslogtreecommitdiffstats
path: root/sys/netinet6
diff options
context:
space:
mode:
authorbluhm <bluhm@openbsd.org>2015-07-28 11:44:51 +0000
committerbluhm <bluhm@openbsd.org>2015-07-28 11:44:51 +0000
commitfbc14a14ca53e2020b6ca0f357de09f0d1e69abb (patch)
treefe09599c734f0c2b8f9ade9d0fae96684af01b34 /sys/netinet6
parentspacing (diff)
downloadwireguard-openbsd-fbc14a14ca53e2020b6ca0f357de09f0d1e69abb.tar.xz
wireguard-openbsd-fbc14a14ca53e2020b6ca0f357de09f0d1e69abb.zip
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@
Diffstat (limited to 'sys/netinet6')
-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