From e6b0a5702508d21c9b1ecdff60a494aa418228b4 Mon Sep 17 00:00:00 2001 From: Bruce M Simpson Date: Wed, 16 Jun 2004 08:28:54 +0000 Subject: [PATCH] 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) --- sys/netinet/ip_input.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 25501aa69293..0d1848204289 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -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)); }