lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Mon,  1 Feb 2016 20:30:57 -0600
From:	Eric Biggers <ebiggers3@...il.com>
To:	pablo@...filter.org
Cc:	kaber@...sh.net, kadlec@...ckhole.kfki.hu, davem@...emloft.net,
	netfilter-devel@...r.kernel.org, coreteam@...filter.org,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	Eric Biggers <ebiggers3@...il.com>
Subject: [PATCH] netfilter: nft_ct: define nft_ct_get_eval_counter() only when needed

This eliminates an "unused function" compiler warning when
CONFIG_NF_CONNTRACK_LABELS is not defined.

Signed-off-by: Eric Biggers <ebiggers3@...il.com>
---
 net/netfilter/nft_ct.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/netfilter/nft_ct.c b/net/netfilter/nft_ct.c
index a0eb216..3cd6b5b 100644
--- a/net/netfilter/nft_ct.c
+++ b/net/netfilter/nft_ct.c
@@ -31,6 +31,7 @@ struct nft_ct {
 	};
 };
 
+#ifdef CONFIG_NF_CONNTRACK_LABELS
 static u64 nft_ct_get_eval_counter(const struct nf_conn_counter *c,
 				   enum nft_ct_keys k,
 				   enum ip_conntrack_dir d)
@@ -42,6 +43,7 @@ static u64 nft_ct_get_eval_counter(const struct nf_conn_counter *c,
 	return nft_ct_get_eval_counter(c, k, IP_CT_DIR_ORIGINAL) +
 	       nft_ct_get_eval_counter(c, k, IP_CT_DIR_REPLY);
 }
+#endif
 
 static void nft_ct_get_eval(const struct nft_expr *expr,
 			    struct nft_regs *regs,
-- 
2.7.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ