Page MenuHomeFreeBSD

D40397.id122770.diff
No OneTemporary

D40397.id122770.diff

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

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)

Event Timeline