[Openswan Users] Compile error: sk_zapped in pfkey_v2

Paul Wouters paul at xelerance.com
Fri Feb 16 00:39:37 EST 2007


On Thu, 15 Feb 2007, Bas Rijniersce wrote:

> I'm trying to compile openswan from cvs (cvs -d
> :pserver:anoncvs at anoncvs.openswan.org:/public/cvs co openswan-2) on a Fedora
> Core 4 system with kernel 2.6.11-1.1369

> /usr/src/openswan-2/modobj26/pfkey_v2.c:1504: error: âstruct sockâ has no
> member named âsk_zappedâ

> Google showed me a patch that talked about sk_zapped missing in 2.6.12
> (instead using SOCK flags i think). Apparently that patch is not in the
> version I try to compile? Is there another version I can get from CVS or
> other trick to get it to compile?

Welcome to Fedora incorporating API changes in the kernel before they are
included in the Linus kernel. Therefor, any checks we do for API changes
based on kernel versions will fail on fedora kernels that pre-date them

Generally, this can be solved by editting ipsec_kversion.h and decrease
the checked kernel version by one for the feature that is getting
misdefined. In your case:

#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12)
#define HAVE_SOCK_ZAPPED
#define NET_26_12_SKALLOC
#endif

This check is failing because redhat put in the API change in a patched 2.6.11
kernel. This API change in the linus kernel happened in 2.6.12.

If anyone can come up with a structural way to fix this redhat problem, I'm
very interested. But the real solution is for redhat to call kernels with
an API change differently. With so many kernel hackers at redhat, one would
except that this situation shouldn't be neccessary.

Paul


More information about the Users mailing list