diff options
author | bz <bz@FreeBSD.org> | 2006-05-05 07:31:03 +0000 |
---|---|---|
committer | bz <bz@FreeBSD.org> | 2006-05-05 07:31:03 +0000 |
commit | 33da3ee9c3b88da5105bda439d455db64e29ec31 (patch) | |
tree | beaa801b0b9799f7f003efb8a6d87a6a82648027 /sys/netinet/ip_ipsec.c | |
parent | b1e7cf5430dbc67cf0d6fef98eb6b352bffdeae7 (diff) | |
download | FreeBSD-src-33da3ee9c3b88da5105bda439d455db64e29ec31.zip FreeBSD-src-33da3ee9c3b88da5105bda439d455db64e29ec31.tar.gz |
Make sure the ip data pointer is correct before touching it again
after ipsec4_output processing else KAME IPSec using the handbook
configuration with gif(4) will panic the kernel.
Problem reported by: t. patterson <tp lot.org>
Tested by: t. patterson <tp lot.org>
Diffstat (limited to 'sys/netinet/ip_ipsec.c')
-rw-r--r-- | sys/netinet/ip_ipsec.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/netinet/ip_ipsec.c b/sys/netinet/ip_ipsec.c index eee144f..382bf43 100644 --- a/sys/netinet/ip_ipsec.c +++ b/sys/netinet/ip_ipsec.c @@ -421,6 +421,7 @@ ip_ipsec_output(struct mbuf **m, struct inpcb *inp, int *flags, int *error, *ifp = (*ro)->ro_rt->rt_ifp; } } + ip = mtod(*m, struct ip *); /* make it flipped, again. */ ip->ip_len = ntohs(ip->ip_len); |