mirror of
https://git.FreeBSD.org/src.git
synced 2024-10-19 02:29:40 +00:00
Pull up to ETHER_HDR_LEN before passing an mbuf to ether_input().
The bug was found by running ng_dummy(4) node configured with a delay, in front of the ng_eiface(4) node.
This commit is contained in:
parent
b86d93e940
commit
a9a03de54d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=142945
@ -613,6 +613,12 @@ ng_eiface_rcvdata(hook_p hook, item_p item)
|
||||
return (ENETDOWN);
|
||||
}
|
||||
|
||||
if (m->m_len < ETHER_HDR_LEN) {
|
||||
m = m_pullup(m, ETHER_HDR_LEN);
|
||||
if (m == NULL)
|
||||
return (EINVAL);
|
||||
}
|
||||
|
||||
/* Note receiving interface */
|
||||
m->m_pkthdr.rcvif = ifp;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user