In ip_forward(), set m->m_pkthdr.len correctly such that the mbuf chain
is sane, and ipsec4_getpolicybyaddr() will therefore complete. PR: kern/42727 Obtained from: KAME (kame/freebsd4/sys/netinet/ip_input.c rev 1.42)
This commit is contained in:
parent
4ee9ad6b13
commit
e6b0a57025
@ -1806,6 +1806,7 @@ ip_forward(struct mbuf *m, int srcrt, struct sockaddr_in *next_hop)
|
||||
if (mcopy != NULL) {
|
||||
mcopy->m_len = imin((ip->ip_hl << 2) + 8,
|
||||
(int)ip->ip_len);
|
||||
mcopy->m_pkthdr.len = mcopy->m_len;
|
||||
m_copydata(m, 0, mcopy->m_len, mtod(mcopy, caddr_t));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user