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:
Bruce M Simpson 2004-06-16 08:28:54 +00:00
parent 4ee9ad6b13
commit e6b0a57025
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=130580

View File

@ -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));
}