Under sys/netpfil/ipfw, surround two IPv6-specific static functions with
#ifdef INET6, since they are unused when INET6 is disabled. MFC after: 3 days
This commit is contained in:
parent
2de7ba0758
commit
a3043eeef2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=261915
@ -248,6 +248,7 @@ SYSEND
|
||||
#endif /* SYSCTL_NODE */
|
||||
|
||||
|
||||
#ifdef INET6
|
||||
static __inline int
|
||||
hash_packet6(struct ipfw_flow_id *id)
|
||||
{
|
||||
@ -259,6 +260,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
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user