[Openswan dev] ipsec_kern24.h usage and history?

David McCullough david_mccullough at mcafee.com
Sat Feb 20 20:32:26 EST 2010


Jivin Paul Wouters lays it down ...
> 
> Hi,
> 
> While tracking down a bug in ipsec_dev_put being undefined, I ended up
> chasing this to ipsec_kern24.h. This confused me, because the name
> suggests it is for 2.4 kernels only, as does the header in that file saying
> this are macros for 2.6 calls. And a check in ipsec_kversion shows:
> 
> #if __KERNEL__
> # if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,0)
> #  if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0) 
> #   include "openswan/ipsec_kern24.h"
> 
> But if you look at many files in linux/net/ipsec, they end up including
> ipsec_kern24.h directly - in fact, they seem to require it for various
> macros (including the one I was hunting down, ipsec_dev_put())
> 
> Does anyone know the history behind this?

No,  but I have hit a similar problem before as well.

> Should this be cleaned up into ipsec_kversion.h?

yes :-)

Cheers,
davidm

-- 
David McCullough,      david_mccullough at mcafee.com,  Ph:+61 734352815
McAfee - SnapGear      http://www.mcafee.com         http://www.uCdot.org


More information about the Dev mailing list