Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102836071
D38066.id115541.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
948 B
Referenced Files
None
Subscribers
None
D38066.id115541.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D38066: bridge: Add support for emulated netmap mode
Attached
Detach File
Event Timeline
Log In to Comment