Page MenuHomeFreeBSD

D3534.diff
No OneTemporary

D3534.diff

Index: head/sys/netpfil/pf/pf.c
===================================================================
--- head/sys/netpfil/pf/pf.c
+++ head/sys/netpfil/pf/pf.c
@@ -6085,7 +6085,17 @@
M_ASSERTPKTHDR(m);
- if (dir == PF_OUT && m->m_pkthdr.rcvif && ifp != m->m_pkthdr.rcvif)
+ /* Detect packet forwarding.
+ * If the input interface is different from the output interface we're
+ * forwarding.
+ * We do need to be careful about bridges. If the
+ * net.link.bridge.pfil_bridge sysctl is set we can be filtering on a
+ * bridge, so if the input interface is a bridge member and the output
+ * interface is its bridge we're not actually forwarding but bridging.
+ */
+ if (dir == PF_OUT && m->m_pkthdr.rcvif && ifp != m->m_pkthdr.rcvif
+ && (m->m_pkthdr.rcvif->if_bridge == NULL
+ || m->m_pkthdr.rcvif->if_bridge != ifp->if_softc))
fwdir = PF_FWD;
if (!V_pf_status.running)

File Metadata

Mime Type
text/plain
Expires
Sun, Feb 23, 3:03 AM (13 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16786702
Default Alt Text
D3534.diff (899 B)

Event Timeline