Re: [GIT]: Networking

Pablo Neira Ayuso
2008-10-17T12:25:22Z

[-- Attachment #1: Type: text/plain, Size: 675 bytes --]

Ingo Molnar wrote:
> * Patrick McHardy <kaber@trash.net> wrote:
>
>>> net/netfilter/nf_conntrack_netlink.c:819: warning: ‘enum nf_nat_manip_type’ declared inside parameter list
>>> net/netfilter/nf_conntrack_netlink.c:819: warning: its scope is only this definition or declaration, which is probably not what you want
>>> net/netfilter/nf_conntrack_netlink.c:818: error: parameter 2 (‘manip’) has incomplete type
>> Thanks Ingo. I just sent this patch to Benjamin Herrenschmidt
>> for testing.
>
> build still fails with the attached config.

This should fix it. I have slightly tested it here with your config.

--
"Los honestos son inadaptados sociales" -- Les Luthiers

[-- Attachment #2: x --]
[-- Type: text/plain, Size: 1144 bytes --]

netfilter: ctnetlink: fix compilation without NAT support

This patch fixes the compilation of ctnetlink when the NAT support
is not enabled.

/home/benh/kernels/linux-powerpc/net/netfilter/nf_conntrack_netlink.c:819: warning: enum nf_nat_manip_type\u2019 declared inside parameter list
/home/benh/kernels/linux-powerpc/net/netfilter/nf_conntrack_netlink.c:819: warning: its scope is only this definition or declaration, which is probably not what you want

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>

Index: net-next-2.6/net/netfilter/nf_conntrack_netlink.c
===================================================================
--- net-next-2.6.orig/net/netfilter/nf_conntrack_netlink.c 2008-10-17 14:15:26.000000000 +0200
+++ net-next-2.6/net/netfilter/nf_conntrack_netlink.c 2008-10-17 14:17:12.000000000 +0200
@@ -814,6 +814,7 @@
return err;
}

+#ifdef CONFIG_NF_NAT_NEEDED
static int
ctnetlink_parse_nat_setup(struct nf_conn *ct,
enum nf_nat_manip_type manip,
@@ -841,6 +842,7 @@

return parse_nat_setup(ct, manip, attr);
}
+#endif

static int
ctnetlink_change_status(struct nf_conn *ct, struct nlattr *cda[])