Page MenuHomeFreeBSD

D42390.diff
No OneTemporary

D42390.diff

diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -534,10 +534,10 @@
return;
}
#endif
- if (m->m_len < ETHER_HDR_LEN) {
- /* XXX maybe should pullup? */
+ if (__predict_false(m->m_len < ETHER_HDR_LEN)) {
+ /* Drivers should pullup and ensure the mbuf is valid */
if_printf(ifp, "discard frame w/o leading ethernet "
- "header (len %u pkt len %u)\n",
+ "header (len %d pkt len %d)\n",
m->m_len, m->m_pkthdr.len);
if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
m_freem(m);

File Metadata

Mime Type
text/plain
Expires
Sat, Jan 25, 5:11 AM (20 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16125668
Default Alt Text
D42390.diff (568 B)

Event Timeline