summaryrefslogtreecommitdiffstats
path: root/sys/netpfil
diff options
context:
space:
mode:
authorkp <kp@FreeBSD.org>2015-06-18 20:59:48 +0000
committerkp <kp@FreeBSD.org>2015-06-18 20:59:48 +0000
commit7602db847b7820a651918f47a72aec1ab5f309e6 (patch)
tree5500b708f1bc3e2c6e94cc8868b581ca20933039 /sys/netpfil
parent1af840c38ec20bb93f4838a45f3df0e34d6c5660 (diff)
downloadFreeBSD-src-7602db847b7820a651918f47a72aec1ab5f309e6.zip
FreeBSD-src-7602db847b7820a651918f47a72aec1ab5f309e6.tar.gz
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
Diffstat (limited to 'sys/netpfil')
-rw-r--r--sys/netpfil/pf/pf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c
index 856bffb..db33e20 100644
--- a/sys/netpfil/pf/pf.c
+++ b/sys/netpfil/pf/pf.c
@@ -6078,7 +6078,7 @@ pf_test6(int dir, struct ifnet *ifp, struct mbuf **m0, struct inpcb *inp)
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)
OpenPOWER on IntegriCloud