Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F167764922
D40397.id122770.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
643 B
Referenced Files
None
Subscribers
None
D40397.id122770.diff
View Options
diff --git a/sys/net/if_epair.c b/sys/net/if_epair.c
--- a/sys/net/if_epair.c
+++ b/sys/net/if_epair.c
@@ -336,6 +336,15 @@
return (0);
M_ASSERTPKTHDR(m);
+ /* We could just transmit this, but it makes testing easier if we're a
+ * little bit more like real hardware.
+ * Allow just that little bit extra for ethernet (and vlan) headers. */
+ if (m->m_pkthdr.len > (ifp->if_mtu + sizeof(struct ether_vlan_header))) {
+ m_freem(m);
+ if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
+ return (E2BIG);
+ }
+
/*
* We are not going to use the interface en/dequeue mechanism
* on the TX side. We are called from ether_output_frame()
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Aug 25, 9:18 AM (14 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37230061
Default Alt Text
D40397.id122770.diff (643 B)
Attached To
Mode
D40397: if_epair: do not transmit packets that exceed the interface MTU
Attached
Detach File
Event Timeline
Log In to Comment