diff --git a/sys/modules/Makefile b/sys/modules/Makefile index 2c002a10da3..17d5be0b5a9 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -137,7 +137,7 @@ SUBDIR= ${_3dfx} \ ${_io} \ ipdivert \ ${_ipfilter} \ - ipfw \ + ${_ipfw} \ ipfw_nat \ ${_ipmi} \ ip_mroute_mod \ @@ -379,6 +379,10 @@ _if_carp= if_carp _ipfilter= ipfilter .endif +.if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES) +_ipfw= ipfw +.endif + .if ${MK_NETGRAPH} != "no" || defined(ALL_MODULES) _netgraph= netgraph .endif diff --git a/sys/modules/ipfw/Makefile b/sys/modules/ipfw/Makefile index 60ab84858c7..575a6ce4895 100644 --- a/sys/modules/ipfw/Makefile +++ b/sys/modules/ipfw/Makefile @@ -8,7 +8,7 @@ KMOD= ipfw SRCS= ip_fw2.c ip_fw_pfil.c SRCS+= ip_fw_dynamic.c ip_fw_log.c SRCS+= ip_fw_sockopt.c ip_fw_table.c -SRCS+= opt_inet.h opt_inet6.h opt_ipfw.h opt_ipsec.h +SRCS+= opt_inet.h opt_inet6.h opt_ipdivert.h opt_ipfw.h opt_ipsec.h CFLAGS+= -DIPFIREWALL CFLAGS+= -I${.CURDIR}/../../contrib/pf diff --git a/sys/netinet/ipfw/ip_fw2.c b/sys/netinet/ipfw/ip_fw2.c index 619ce6b91e5..eec67cc9682 100644 --- a/sys/netinet/ipfw/ip_fw2.c +++ b/sys/netinet/ipfw/ip_fw2.c @@ -31,14 +31,11 @@ __FBSDID("$FreeBSD$"); */ #include "opt_ipfw.h" -#if !defined(KLD_MODULE) #include "opt_ipdivert.h" -#include "opt_ipdn.h" #include "opt_inet.h" #ifndef INET #error IPFIREWALL requires INET. #endif /* INET */ -#endif #include "opt_inet6.h" #include "opt_ipsec.h" diff --git a/sys/netinet/ipfw/ip_fw_dynamic.c b/sys/netinet/ipfw/ip_fw_dynamic.c index d1eec89eed4..72390547587 100644 --- a/sys/netinet/ipfw/ip_fw_dynamic.c +++ b/sys/netinet/ipfw/ip_fw_dynamic.c @@ -34,16 +34,11 @@ __FBSDID("$FreeBSD$"); */ #include "opt_ipfw.h" -#if !defined(KLD_MODULE) -#include "opt_ipdivert.h" -#include "opt_ipdn.h" #include "opt_inet.h" #ifndef INET #error IPFIREWALL requires INET. #endif /* INET */ -#endif #include "opt_inet6.h" -#include "opt_ipsec.h" #include #include diff --git a/sys/netinet/ipfw/ip_fw_log.c b/sys/netinet/ipfw/ip_fw_log.c index 2f6e8b61fee..b9ed6b36da1 100644 --- a/sys/netinet/ipfw/ip_fw_log.c +++ b/sys/netinet/ipfw/ip_fw_log.c @@ -31,16 +31,11 @@ __FBSDID("$FreeBSD$"); */ #include "opt_ipfw.h" -#if !defined(KLD_MODULE) -#include "opt_ipdivert.h" -#include "opt_ipdn.h" #include "opt_inet.h" #ifndef INET #error IPFIREWALL requires INET. #endif /* INET */ -#endif #include "opt_inet6.h" -#include "opt_ipsec.h" #include #include diff --git a/sys/netinet/ipfw/ip_fw_pfil.c b/sys/netinet/ipfw/ip_fw_pfil.c index a09ca7982f3..695613d43e1 100644 --- a/sys/netinet/ipfw/ip_fw_pfil.c +++ b/sys/netinet/ipfw/ip_fw_pfil.c @@ -28,14 +28,11 @@ __FBSDID("$FreeBSD$"); #include "opt_ipfw.h" -#if !defined(KLD_MODULE) -#include "opt_ipdn.h" #include "opt_inet.h" #include "opt_inet6.h" #ifndef INET #error IPFIREWALL requires INET. #endif /* INET */ -#endif /* KLD_MODULE */ #include #include diff --git a/sys/netinet/ipfw/ip_fw_sockopt.c b/sys/netinet/ipfw/ip_fw_sockopt.c index 610570ba9a7..dce3fdc750b 100644 --- a/sys/netinet/ipfw/ip_fw_sockopt.c +++ b/sys/netinet/ipfw/ip_fw_sockopt.c @@ -34,16 +34,11 @@ __FBSDID("$FreeBSD$"); */ #include "opt_ipfw.h" -#if !defined(KLD_MODULE) -#include "opt_ipdivert.h" -#include "opt_ipdn.h" #include "opt_inet.h" #ifndef INET #error IPFIREWALL requires INET. #endif /* INET */ -#endif #include "opt_inet6.h" -#include "opt_ipsec.h" #include #include diff --git a/sys/netinet/ipfw/ip_fw_table.c b/sys/netinet/ipfw/ip_fw_table.c index f72401765a1..6a1c8e0a3f3 100644 --- a/sys/netinet/ipfw/ip_fw_table.c +++ b/sys/netinet/ipfw/ip_fw_table.c @@ -40,16 +40,11 @@ __FBSDID("$FreeBSD$"); */ #include "opt_ipfw.h" -#if !defined(KLD_MODULE) -#include "opt_ipdivert.h" -#include "opt_ipdn.h" #include "opt_inet.h" #ifndef INET #error IPFIREWALL requires INET. #endif /* INET */ -#endif #include "opt_inet6.h" -#include "opt_ipsec.h" #include #include