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>
This commit is contained in:
Bjoern A. Zeeb 2006-05-05 07:31:03 +00:00
parent 3127286870
commit 91b309a1c4

View File

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