Page MenuHomeFreeBSD

D38066.id115541.diff
No OneTemporary

D38066.id115541.diff

diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c
--- a/sys/net/if_bridge.c
+++ b/sys/net/if_bridge.c
@@ -2492,9 +2492,30 @@
return (m);
}
+ bridge_span(sc, m);
+
eh = mtod(m, struct ether_header *);
- bridge_span(sc, m);
+ /*
+ * If the bridge is opened in netmap's emulated mode, claim all packets
+ * for netmap.
+ */
+ if (bifp->if_capenable & IFCAP_NETMAP) {
+ m->m_pkthdr.rcvif = bifp;
+ if ((bif->bif_flags & IFBIF_LEARNING) != 0) {
+ error = bridge_rtupdate(sc, eh->ether_shost,
+ vlan, bif, 0, IFBAF_DYNAMIC);
+ if (error != 0 && bif->bif_addrmax) {
+ m_freem(m);
+ if_inc_counter(bifp, IFCOUNTER_IERRORS, 1);
+ return (NULL);
+ }
+ }
+ if_inc_counter(bifp, IFCOUNTER_IPACKETS, 1);
+ if_inc_counter(bifp, IFCOUNTER_IBYTES, m->m_pkthdr.len);
+ bifp->if_input(bifp, m);
+ return (NULL);
+ }
if (m->m_flags & (M_BCAST|M_MCAST)) {
/* Tap off 802.1D packets; they do not get forwarded. */

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 18, 7:28 PM (21 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14703520
Default Alt Text
D38066.id115541.diff (948 B)

Event Timeline