2.3.99-pre9: building with ipchains compatability

From: Nick Holloway (Nick.Holloway@alfie.demon.co.uk)
Date: Sat May 27 2000 - 17:42:46 EDT

  • Next message: Igmar Palsenberg: "Re: Actual environment size comparison of CML1 and CML2"

    I had problems including the ipchains compatability compiled into the
    kernel, or as a versioned module.

    For some reason (that I've failed to get to the bottom of) selecting
    ipchains compatability to be compiled into the kernel doesn't end up
    with the code included.

    The following are set in .config:

        CONFIG_NETFILTER=y
        CONFIG_IP_NF_COMPAT_IPCHAINS=y
        CONFIG_IP_NF_NAT_NEEDED=y

    The code is compiled, and included in net/network.a, but does not get
    included in vmlinux. Using nm to look for the symbol ipfw_init_or_cleanup
    demonstrates this:

        alfie@bagpuss$ nm net/ipv4/netfilter/netfilter.o | grep ipfw_init_or_cleanup
        000019e4 T ipfw_init_or_cleanup
        alfie@bagpuss$ nm net/network.a | grep ipfw_init_or_cleanup
        000019e4 T ipfw_init_or_cleanup
        alfie@bagpuss$ nm vmlinux | grep ipfw_init_or_cleanup
        alfie@bagpuss$

    There is another problem when you compile as a module, when you have
    CONFIG_MODVERSIONS defined. The source files that compile into the
    ipchains module do not include "module.h", so you have unversioned
    symbols imported, and the resultant module will not load.

    I fixed this by adding "#include <linux/module.h>" to a wild selection
    of files in net/ipv4/netfilter. I haven't produced a patch, as I don't
    know if I've gone over the top, and if I should remove the inclusion of
    "<linux/config.h>", as this is included by "<linux/module.h>".

    -- 
     `O O'  | Nick.Holloway@pyrites.org.uk
    // ^ \\ | http://www.pyrites.org.uk/
    

    - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



    This archive was generated by hypermail 2b29 : Sat May 27 2000 - 18:00:11 EDT