Fix a problem introduced in revision 1.84: m_pullup() does not
necessarily return the same mbuf chain so we need to recompute mtod() consumers after pulling up.
This commit is contained in:
parent
dbe0253a8b
commit
78e2d2bd28
@ -530,11 +530,13 @@ arpintr(struct mbuf *m)
|
||||
return;
|
||||
}
|
||||
|
||||
if (m->m_pkthdr.len < arphdr_len(ar) &&
|
||||
(m = m_pullup(m, arphdr_len(ar))) == NULL) {
|
||||
log(LOG_ERR, "arp: runt packet\n");
|
||||
m_freem(m);
|
||||
return;
|
||||
if (m->m_pkthdr.len < arphdr_len(ar)) {
|
||||
if ((m = m_pullup(m, arphdr_len(ar))) == NULL) {
|
||||
log(LOG_ERR, "arp: runt packet\n");
|
||||
m_freem(m);
|
||||
return;
|
||||
}
|
||||
ar = mtod(m, struct arphdr *);
|
||||
}
|
||||
|
||||
switch (ntohs(ar->ar_pro)) {
|
||||
|
Loading…
Reference in New Issue
Block a user