Date: Thu, 18 Jun 2015 20:59:49 +0000 (UTC) From: Kristof Provost <kp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284577 - stable/10/sys/netpfil/pf Message-ID: <201506182059.t5IKxnMZ038109@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kp Date: Thu Jun 18 20:59:48 2015 New Revision: 284577 URL: https://svnweb.freebsd.org/changeset/base/284577 Log: Merge r281536 pf: Fix forwarding detection If the direction is not PF_OUT we can never be forwarding. Some input packets have rcvif != ifp (looped back packets), which lead us to ip6_forward() inbound packets, causing panics. Equally, we need to ensure that packets were really received and not locally generated before trying to ip6_forward() them. Differential Revision: https://reviews.freebsd.org/D2822 Reviewed by: gnn Modified: stable/10/sys/netpfil/pf/pf.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netpfil/pf/pf.c ============================================================================== --- stable/10/sys/netpfil/pf/pf.c Thu Jun 18 20:57:21 2015 (r284576) +++ stable/10/sys/netpfil/pf/pf.c Thu Jun 18 20:59:48 2015 (r284577) @@ -6078,7 +6078,7 @@ pf_test6(int dir, struct ifnet *ifp, str M_ASSERTPKTHDR(m); - if (ifp != m->m_pkthdr.rcvif) + if (dir == PF_OUT && m->m_pkthdr.rcvif && ifp != m->m_pkthdr.rcvif) fwdir = PF_FWD; if (!V_pf_status.running)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201506182059.t5IKxnMZ038109>