OpenVZ Forum


Home » Mailing lists » Devel » [PATCH][NETFILTER]: Ipv6-related xt_hashlimit compilation fix.
[PATCH][NETFILTER]: Ipv6-related xt_hashlimit compilation fix. [message #26770] Thu, 31 January 2008 15:11 Go to next message
Pavel Emelianov is currently offline  Pavel Emelianov
Messages: 1149
Registered: September 2006
Senior Member
The hashlimit_ipv6_mask() is called from under IP6_NF_IPTABLES
config option, but is not under it by itself.

gcc warns us about it :) :
net/netfilter/xt_hashlimit.c:473: warning: ‘hashlimit_ipv6_mask’ defined but not used

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>

---

diff --git a/net/netfilter/xt_hashlimit.c b/net/netfilter/xt_hashlimit.c
index 54aaf5b..744c7f2 100644
--- a/net/netfilter/xt_hashlimit.c
+++ b/net/netfilter/xt_hashlimit.c
@@ -469,6 +469,7 @@ static inline __be32 maskl(__be32 a, unsigned int l)
 	return htonl(ntohl(a) & ~(~(u_int32_t)0 >> l));
 }
 
+#if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE)
 static void hashlimit_ipv6_mask(__be32 *i, unsigned int p)
 {
 	switch (p) {
@@ -503,6 +504,7 @@ static void hashlimit_ipv6_mask(__be32 *i, unsigned int p)
 		break;
 	}
 }
+#endif
 
 static int
 hashlimit_init_dst(const struct xt_hashlimit_htable *hinfo,
Re: [PATCH][NETFILTER]: Ipv6-related xt_hashlimit compilation fix. [message #26791 is a reply to message #26770] Fri, 01 February 2008 02:42 Go to previous message
davem is currently offline  davem
Messages: 463
Registered: February 2006
Senior Member
From: Pavel Emelyanov <xemul@openvz.org>
Date: Thu, 31 Jan 2008 18:11:37 +0300

> The hashlimit_ipv6_mask() is called from under IP6_NF_IPTABLES
> config option, but is not under it by itself.
> 
> gcc warns us about it :) :
> net/netfilter/xt_hashlimit.c:473: warning: ‘hashlimit_ipv6_mask’ defined but not used
> 
> Signed-off-by: Pavel Emelyanov <xemul@openvz.org>

Applied, thanks.
Previous Topic: [PATCH 2/6][INET]: Consolidate inet(6)_hash_connect.
Next Topic: [PATCH 0/6] preparations to enable netdevice notifiers inside a namespace (resend)
Goto Forum:
  


Current Time: Sat Apr 13 06:45:19 GMT 2024

Total time taken to generate the page: 0.01588 seconds