Commit 8e36c4b5 authored by Pablo Neira Ayuso's avatar Pablo Neira Ayuso

netfilter: ctnetlink: fix compilation with NF_CONNTRACK_EVENTS=n

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: default avatarRandy Dunlap <rdunlap@xenotime.net>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent ab5e8b77
...@@ -478,7 +478,6 @@ ctnetlink_fill_info(struct sk_buff *skb, u32 pid, u32 seq, u32 type, ...@@ -478,7 +478,6 @@ ctnetlink_fill_info(struct sk_buff *skb, u32 pid, u32 seq, u32 type,
return -1; return -1;
} }
#ifdef CONFIG_NF_CONNTRACK_EVENTS
static inline size_t static inline size_t
ctnetlink_proto_size(const struct nf_conn *ct) ctnetlink_proto_size(const struct nf_conn *ct)
{ {
...@@ -565,6 +564,7 @@ ctnetlink_nlmsg_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 static int
ctnetlink_conntrack_event(unsigned int events, struct nf_ct_event *item) ctnetlink_conntrack_event(unsigned int events, struct nf_ct_event *item)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment