Skip to content

Commit

Permalink
[NETFILTER]: Ipv6-related xt_hashlimit compilation fix.
Browse files Browse the repository at this point in the history
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Pavel Emelyanov authored and David S. Miller committed Feb 1, 2008
1 parent e5dfb81 commit 3ed5df4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/netfilter/xt_hashlimit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 3ed5df4

Please sign in to comment.