mirror of
https://github.com/opnsense/src.git
synced 2026-06-03 13:58:30 -04:00
ethernet: Fix logging of frame length
Both the mbuf length and the total packet length are signed. While here, update a stall comment to reflect the current practice. Reviewed by: kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42390 (cherry picked from commit e7102929bf4fea4bf22855d2d6031edf6c413608)
This commit is contained in:
parent
4ce277a315
commit
4d65728d55
1 changed files with 3 additions and 3 deletions
|
|
@ -536,10 +536,10 @@ ether_input_internal(struct ifnet *ifp, struct mbuf *m)
|
|||
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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue