MFC: 1.55: Restore part of the code mistakenly dropped in rev. 1.25.
This commit is contained in:
parent
af77f484ad
commit
f130d9a1f5
@ -644,6 +644,15 @@ ng_ether_rcv_upper(node_p node, struct mbuf *m)
|
||||
const priv_p priv = NG_NODE_PRIVATE(node);
|
||||
struct ifnet *ifp = priv->ifp;
|
||||
|
||||
/* Check length and pull off header */
|
||||
if (m->m_pkthdr.len < sizeof(struct ether_header)) {
|
||||
NG_FREE_M(m);
|
||||
return (EINVAL);
|
||||
}
|
||||
if (m->m_len < sizeof(struct ether_header) &&
|
||||
(m = m_pullup(m, sizeof(struct ether_header))) == NULL)
|
||||
return (ENOBUFS);
|
||||
|
||||
m->m_pkthdr.rcvif = ifp;
|
||||
|
||||
if (BDG_ACTIVE(priv->ifp) )
|
||||
|
Loading…
Reference in New Issue
Block a user