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:
bz 2010-04-21 10:21:34 +00:00
parent 2be29b5c71
commit b883f7a391

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