]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
netfilter: ctnetlink: fix compilation with NF_CONNTRACK_EVENTS=n
authorPablo Neira Ayuso <pablo@netfilter.org>
Fri, 22 Jun 2012 23:43:51 +0000 (01:43 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sat, 23 Jun 2012 00:13:46 +0000 (02:13 +0200)
This patch fixes compilation with NF_CONNTRACK_EVENTS=n and
NETFILTER_NETLINK_QUEUE_CT=y.

I'm leaving all those static inline functions that calculate the size
of the event message out of the ifdef area of NF_CONNTRACK_EVENTS since
they will not be included by gcc in case they are unused.

Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_conntrack_netlink.c

index 8bb47339b7708fc10e58568228bd6b2458e5da83..b9b8f4ac7a36c1c3ccae377123bb87932b795ede 100644 (file)
@@ -478,7 +478,6 @@ nla_put_failure:
        return -1;
 }
 
-#ifdef CONFIG_NF_CONNTRACK_EVENTS
 static inline size_t
 ctnetlink_proto_size(const struct nf_conn *ct)
 {
@@ -565,6 +564,7 @@ ctnetlink_nlmsg_size(const struct nf_conn *ct)
               ;
 }
 
+#ifdef CONFIG_NF_CONNTRACK_EVENTS
 static int
 ctnetlink_conntrack_event(unsigned int events, struct nf_ct_event *item)
 {