[Openswan dev] status of klips26 in HEAD

Nate Carlson natecars at natecarlson.com
Thu Aug 26 12:26:03 CEST 2004

Just tried a modules26 build again; ran into the same match686.S error.
Applied the attached patch to module26.make; after that, it builds up to
the following point:

natecars at knight:~/tmp/openswan-2$ make V=1 KERNELSRC=/home/natecars/build/kernel/knight/ module26
  gcc -Wp,-MD,/home/natecars/tmp/openswan-2/modobj26/.ipsec_ah.s.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -pipe -msoft-float -mpreferred-stack-boundary=2  -march=pentium4 -Iinclude/asm-i386/mach-default -O2 -fomit-frame-pointer  -include /home/natecars/tmp/openswan-2/packaging/linus/config-all.h -I/home/natecars/tmp/openswan-2/linux/include -DIPCOMP_PREFIX  -DMODULE -DKBUILD_BASENAME=ipsec_ah -DKBUILD_MODNAME=ipsec -S -o /home/natecars/tmp/openswan-2/modobj26/ipsec_ah.s /home/natecars/tmp/openswan-2/modobj26/ipsec_ah.c
/home/natecars/tmp/openswan-2/modobj26/ipsec_ah.c:333: error: variable `ah_protocol' has initializer but incomplete type
/home/natecars/tmp/openswan-2/modobj26/ipsec_ah.c:334: error: unknown field `handler' specified in initializer
/home/natecars/tmp/openswan-2/modobj26/ipsec_ah.c:334: warning: excess elements in struct initializer
/home/natecars/tmp/openswan-2/modobj26/ipsec_ah.c:334: warning: (near initialization for `ah_protocol')
/home/natecars/tmp/openswan-2/modobj26/ipsec_ah.c:335: error: unknown field `no_policy' specified in initializer
/home/natecars/tmp/openswan-2/modobj26/ipsec_ah.c:335: warning: excess elements in struct initializer
/home/natecars/tmp/openswan-2/modobj26/ipsec_ah.c:335: warning: (near initialization for `ah_protocol')
/home/natecars/tmp/openswan-2/modobj26/ipsec_ah.c:333: error: storage size of `ah_protocol' isn't known
make[2]: *** [/home/natecars/tmp/openswan-2/modobj26/ipsec_ah.s] Error 1
make[1]: *** [_module_/home/natecars/tmp/openswan-2/modobj26] Error 2
make[1]: Leaving directory `/home/natecars/build/kernel/knight/'
make: *** [module26] Error 2

Hmm, interesting - just tested with 2.6.7, module builds just fine. Looks
like something changed in that's breaking the build process. Ah, I
see - looks like changed 'inet_protocol' to 'net_protocol' in
include/net/protocol.h. I replaced all occurances of 'inet_protocol' with
'net_protocol' in Openswan, and get a successful build. Not sure if that's
the right thing to do, however - in fact, I'm fairly certain that it's
*not* the right thing to do.  :) The resultant module does load and work,
however (yay!).

Buglet #1: If I set things to 'y' instead of 'm' in
           packaging/makefiles/module.defs, they don't seem to get built.

Buglet #2: If I disable AES and enable CryptoAPI in
           packaging/makefiles/module.defs, and rebuild the module, I get:

*** Warning: "ipsec_aes_init" [/home/natecars/tmp/openswan-2/modobj26/ipsec.ko] undefined!

in ipsec_alg.c, it's setup as:

        /* If we are suppose to use our AES, and don't have CryptoAPI enabled... */
                extern int ipsec_aes_init(void);

Since I am not defining CONFIG_KLIPS_ENC_AES and am defining
CONFIG_KLIPS_ENC_CRYPTOAPI, shouldn't ipsec_aes_init never be called? Are
the definitions not being passed in properly? (When I hacked up my
makefile, I was passing them directly to the compiler with '-Dwhatever' if
it was defined in the module config; not sure how it does it when you've
set things up correctly, like you have. I've attached patch #2 that
adds the manual -D's to the Makefile - with those defined, CryptoAPI
works fine. So, yeah, looks like something isn't getting passed in

In any case, great work! I can actually get a working module for 2.6
without too much patching now.  :)

Now, just have to be patient for NAT Traversal.

| nate carlson | natecars at natecarlson.com | http://www.natecarlson.com |
|       depriving some poor village of its idiot since 1981            |
-------------- next part --------------
--- module26.make       2004-08-26 10:29:52.000000000 -0500
+++ module26.make.NATE  2004-08-26 10:28:04.000000000 -0500
@@ -31,6 +31,9 @@
 ${BUILDDIR}/%.h : ${KLIPSSRC}/%.h
        ln -s -f $< $@

+       ln -s -f $< $@
 ${BUILDDIR}/%.c : ${KLIPSSRC}/des/%.c
        ln -s -f $< $@

@@ -43,7 +46,7 @@
 ${BUILDDIR}/%.c : ${KLIPSSRC}/alg/%.c
        ln -s -f $< $@


 # I'm not fixing this in a better way, because we should use the
 # in-kernel zlib!
-------------- next part --------------
--- Makefile.fs2_6	2004-08-26 11:22:57.000000000 -0500
+++ Makefile.fs2_6.nate	2004-08-26 11:21:45.000000000 -0500
@@ -99,7 +99,25 @@
 obj-$(CONFIG_KLIPS_IPCOMP) += ${base-ipcomp-objs}
+macros-y :=
+macros-m :=
+                $(macros-y) $(macros-m)
 # $Log: Makefile.fs2_6,v $

More information about the Dev mailing list