Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F106127825
D19614.id55171.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D19614.id55171.diff
View Options
Index: sys/net/if_bridge.c
===================================================================
--- sys/net/if_bridge.c
+++ sys/net/if_bridge.c
@@ -2422,22 +2422,6 @@
if (memcmp(IF_LLADDR((iface)), eh->ether_dhost, ETHER_ADDR_LEN) == 0 \
OR_CARP_CHECK_WE_ARE_DST((iface)) \
) { \
- if ((iface)->if_type == IFT_BRIDGE) { \
- ETHER_BPF_MTAP(iface, m); \
- if_inc_counter(iface, IFCOUNTER_IPACKETS, 1); \
- if_inc_counter(iface, IFCOUNTER_IBYTES, m->m_pkthdr.len); \
- /* Filter on the physical interface. */ \
- if (V_pfil_local_phys && \
- (PFIL_HOOKED_IN(V_inet_pfil_head) \
- OR_PFIL_HOOKED_INET6)) { \
- if (bridge_pfil(&m, NULL, ifp, \
- PFIL_IN) != 0 || m == NULL) { \
- BRIDGE_UNLOCK(sc); \
- return (NULL); \
- } \
- eh = mtod(m, struct ether_header *); \
- } \
- } \
if (bif->bif_flags & IFBIF_LEARNING) { \
error = bridge_rtupdate(sc, eh->ether_shost, \
vlan, bif, 0, IFBAF_DYNAMIC); \
@@ -2448,6 +2432,24 @@
} \
} \
m->m_pkthdr.rcvif = iface; \
+ if ((iface) == ifp) { \
+ /* Skip bridge processing... src == dest */ \
+ BRIDGE_UNLOCK(sc); \
+ return (m); \
+ } \
+ /* It's passing over or to the bridge, locally. */ \
+ ETHER_BPF_MTAP(bifp, m); \
+ if_inc_counter(bifp, IFCOUNTER_IPACKETS, 1); \
+ if_inc_counter(bifp, IFCOUNTER_IBYTES, m->m_pkthdr.len); \
+ /* Filter on the physical interface. */ \
+ if (V_pfil_local_phys && (PFIL_HOOKED_IN(V_inet_pfil_head) \
+ OR_PFIL_HOOKED_INET6)) { \
+ if (bridge_pfil(&m, NULL, ifp, \
+ PFIL_IN) != 0 || m == NULL) { \
+ BRIDGE_UNLOCK(sc); \
+ return (NULL); \
+ } \
+ } \
BRIDGE_UNLOCK(sc); \
return (m); \
} \
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 26, 8:53 PM (10 m, 6 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15607830
Default Alt Text
D19614.id55171.diff (1 KB)
Attached To
Mode
D19614: if_bridge(4): ensure all traffic passing over the bridge is accounted for
Attached
Detach File
Event Timeline
Log In to Comment