Avoid memory access after free. Use the (shortend) copy for the

ipsec mtu lookup as well.

PR:		kern/145736
Submitted by:	Peter Molnar (peter molnar.cc)
MFC after:	3 days
This commit is contained in:
Bjoern A. Zeeb 2010-04-21 10:21:34 +00:00
parent 3d65a7ed79
commit 1c044382c3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=206989

View File

@ -1590,7 +1590,7 @@ ip_forward(struct mbuf *m, int srcrt)
* If IPsec is configured for this path,
* override any possibly mtu value set by ip_output.
*/
mtu = ip_ipsec_mtu(m, mtu);
mtu = ip_ipsec_mtu(mcopy, mtu);
#endif /* IPSEC */
/*
* If the MTU was set before make sure we are below the