summaryrefslogtreecommitdiffstats
path: root/sys/netpfil
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2014-02-19 07:51:58 +0000
committerdim <dim@FreeBSD.org>2014-02-19 07:51:58 +0000
commit591aab5d2a56a3c675af9e141f9e58e1217383f1 (patch)
tree49c78857d07660fb0d120e8c9aa4f8101648c33c /sys/netpfil
parent5b0bab6d24ecf6c554e4abb7adcaab8b6f5c776e (diff)
downloadFreeBSD-src-591aab5d2a56a3c675af9e141f9e58e1217383f1.zip
FreeBSD-src-591aab5d2a56a3c675af9e141f9e58e1217383f1.tar.gz
MFC r261915:
Under sys/netpfil/ipfw, surround two IPv6-specific static functions with #ifdef INET6, since they are unused when INET6 is disabled.
Diffstat (limited to 'sys/netpfil')
-rw-r--r--sys/netpfil/ipfw/ip_fw_dynamic.c2
-rw-r--r--sys/netpfil/ipfw/ip_fw_table.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/sys/netpfil/ipfw/ip_fw_dynamic.c b/sys/netpfil/ipfw/ip_fw_dynamic.c
index b0456d3..a166d12 100644
--- a/sys/netpfil/ipfw/ip_fw_dynamic.c
+++ b/sys/netpfil/ipfw/ip_fw_dynamic.c
@@ -231,6 +231,7 @@ SYSEND
#endif /* SYSCTL_NODE */
+#ifdef INET6
static __inline int
hash_packet6(struct ipfw_flow_id *id)
{
@@ -242,6 +243,7 @@ hash_packet6(struct ipfw_flow_id *id)
(id->dst_port) ^ (id->src_port);
return i;
}
+#endif
/*
* IMPORTANT: the hash function for dynamic rules must be commutative
diff --git a/sys/netpfil/ipfw/ip_fw_table.c b/sys/netpfil/ipfw/ip_fw_table.c
index a22fff9..95cff5c 100644
--- a/sys/netpfil/ipfw/ip_fw_table.c
+++ b/sys/netpfil/ipfw/ip_fw_table.c
@@ -123,6 +123,7 @@ struct table_xentry {
#define OFF_LEN_IFACE (8 * offsetof(struct xaddr_iface, ifname))
+#ifdef INET6
static inline void
ipv6_writemask(struct in6_addr *addr6, uint8_t mask)
{
@@ -132,6 +133,7 @@ ipv6_writemask(struct in6_addr *addr6, uint8_t mask)
*cp++ = 0xFFFFFFFF;
*cp = htonl(mask ? ~((1 << (32 - mask)) - 1) : 0);
}
+#endif
int
ipfw_add_table_entry(struct ip_fw_chain *ch, uint16_t tbl, void *paddr,
OpenPOWER on IntegriCloud