From 3beb0ebc0557abe69f04aa0d69f0133517cb5a49 Mon Sep 17 00:00:00 2001 From: Alexander Bluhm Date: Tue, 28 Jul 2015 11:44:52 +0000 Subject: 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@ --- sys/netinet6/raw_ip6.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sys') 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 -- cgit v1.2.3