! ! Always use the opt_*.h options for ipfw.ko, not just when ! compiled into the kernel. ! Do not try to build the module without INET support but keep ! #error calls for now in case we would compile it into the ! kernel. ! ! This should fix an issue where the module would fail to enable ! IPv6 support from the rc framework but also other INET and INET6 ! parts being silently compiled out without giving a warning in the ! module case. ! ! Reported by: pluknet ! Tested by: ! Reviewed by: ! MFC After: 3 days ! Index: sys/netinet/ipfw/ip_fw_log.c =================================================================== --- sys/netinet/ipfw/ip_fw_log.c (revision 227018) +++ sys/netinet/ipfw/ip_fw_log.c (working copy) @@ -31,14 +31,12 @@ __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" Index: sys/netinet/ipfw/ip_fw_sockopt.c =================================================================== --- sys/netinet/ipfw/ip_fw_sockopt.c (revision 227018) +++ sys/netinet/ipfw/ip_fw_sockopt.c (working copy) @@ -34,14 +34,12 @@ __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" Index: sys/netinet/ipfw/ip_fw_dynamic.c =================================================================== --- sys/netinet/ipfw/ip_fw_dynamic.c (revision 227018) +++ sys/netinet/ipfw/ip_fw_dynamic.c (working copy) @@ -34,14 +34,12 @@ __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" Index: sys/netinet/ipfw/ip_fw_table.c =================================================================== --- sys/netinet/ipfw/ip_fw_table.c (revision 227018) +++ sys/netinet/ipfw/ip_fw_table.c (working copy) @@ -40,14 +40,12 @@ __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" Index: sys/netinet/ipfw/ip_fw_pfil.c =================================================================== --- sys/netinet/ipfw/ip_fw_pfil.c (revision 227018) +++ sys/netinet/ipfw/ip_fw_pfil.c (working copy) @@ -28,14 +28,12 @@ __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 Index: sys/netinet/ipfw/ip_fw2.c =================================================================== --- sys/netinet/ipfw/ip_fw2.c (revision 227018) +++ sys/netinet/ipfw/ip_fw2.c (working copy) @@ -31,14 +31,12 @@ __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" Index: sys/modules/Makefile =================================================================== --- sys/modules/Makefile (revision 227018) +++ sys/modules/Makefile (working copy) @@ -137,7 +137,7 @@ SUBDIR= ${_3dfx} \ ${_io} \ ipdivert \ ${_ipfilter} \ - ipfw \ + ${_ipfw} \ ipfw_nat \ ${_ipmi} \ ip_mroute_mod \ @@ -378,6 +378,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