summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2005-08-14 18:20:33 +0000
committerbz <bz@FreeBSD.org>2005-08-14 18:20:33 +0000
commit14ab5de8fe9782de460edc4c1b9f28f5dfc8b901 (patch)
tree0d9a9a91d8264488180f35aed318c51e922646ee /sys
parent5f5eca170ab59694b1e50d6c0abb53b0e4863f9c (diff)
downloadFreeBSD-src-14ab5de8fe9782de460edc4c1b9f28f5dfc8b901.zip
FreeBSD-src-14ab5de8fe9782de460edc4c1b9f28f5dfc8b901.tar.gz
Fix broken build of rev. 1.108 in case of no INET6 and IPFIREWALL
compiled into kernel. Spotted and tested by: Michal Mertl <mime at traveller.cz>
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/ip_fw2.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/netinet/ip_fw2.c b/sys/netinet/ip_fw2.c
index 63d81f7..71c5416 100644
--- a/sys/netinet/ip_fw2.c
+++ b/sys/netinet/ip_fw2.c
@@ -323,6 +323,7 @@ SYSCTL_INT(_net_inet_ip_fw, OID_AUTO, dyn_short_lifetime, CTLFLAG_RW,
SYSCTL_INT(_net_inet_ip_fw, OID_AUTO, dyn_keepalive, CTLFLAG_RW,
&dyn_keepalive, 0, "Enable keepalives for dyn. rules");
+#ifdef INET6
/*
* IPv6 specific variables
*/
@@ -330,9 +331,10 @@ SYSCTL_DECL(_net_inet6_ip6);
static struct sysctl_ctx_list ip6_fw_sysctl_ctx;
static struct sysctl_oid *ip6_fw_sysctl_tree;
+#endif /* INET6 */
+#endif /* SYSCTL_NODE */
static int fw_deny_unknown_exthdrs = 1;
-#endif /* SYSCTL_NODE */
/*
@@ -4133,6 +4135,7 @@ ipfw_init(void)
struct ip_fw default_rule;
int error;
+#ifdef INET6
/* Setup IPv6 fw sysctl tree. */
sysctl_ctx_init(&ip6_fw_sysctl_ctx);
ip6_fw_sysctl_tree = SYSCTL_ADD_NODE(&ip6_fw_sysctl_ctx,
@@ -4142,6 +4145,7 @@ ipfw_init(void)
OID_AUTO, "deny_unknown_exthdrs", CTLFLAG_RW | CTLFLAG_SECURE,
&fw_deny_unknown_exthdrs, 0,
"Deny packets with unknown IPv6 Extension Headers");
+#endif
layer3_chain.rules = NULL;
layer3_chain.want_write = 0;
@@ -4235,8 +4239,10 @@ ipfw_destroy(void)
uma_zdestroy(ipfw_dyn_rule_zone);
IPFW_LOCK_DESTROY(&layer3_chain);
+#ifdef INET6
/* Free IPv6 fw sysctl tree. */
sysctl_ctx_free(&ip6_fw_sysctl_ctx);
+#endif
printf("IP firewall unloaded\n");
}
OpenPOWER on IntegriCloud