Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108367123
D42390.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
568 B
Referenced Files
None
Subscribers
None
D42390.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D42390: ethernet: Fix logging of frame length
Attached
Detach File
Event Timeline
Log In to Comment