From owner-svn-src-all@FreeBSD.ORG Sun Nov 6 17:31:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5AEE1065672; Sun, 6 Nov 2011 17:31:57 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 93DFF8FC1A; Sun, 6 Nov 2011 17:31:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pA6HVvPK032995; Sun, 6 Nov 2011 17:31:57 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pA6HVvgW032986; Sun, 6 Nov 2011 17:31:57 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201111061731.pA6HVvgW032986@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 6 Nov 2011 17:31:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r227232 - in stable/9/sys: modules modules/ipfw netinet/ipfw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Nov 2011 17:31:57 -0000 Author: bz Date: Sun Nov 6 17:31:57 2011 New Revision: 227232 URL: http://svn.freebsd.org/changeset/base/227232 Log: MFC r227085: Always use the opt_*.h options for ipfw.ko, not just when compiled into the kernel. Do not try to build the module in case of no 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. While here garbage collect unneeded opt_*.h includes. opt_ipdn.h is not used anywhere but we need to leave the DUMMYNET entry in options for conditional inclusion in kernel so keep the file with the same name. Reported by: pluknet Reviewed by: plunket, jhb Approved by: re (kib) Modified: stable/9/sys/modules/Makefile stable/9/sys/modules/ipfw/Makefile stable/9/sys/netinet/ipfw/ip_fw2.c stable/9/sys/netinet/ipfw/ip_fw_dynamic.c stable/9/sys/netinet/ipfw/ip_fw_log.c stable/9/sys/netinet/ipfw/ip_fw_pfil.c stable/9/sys/netinet/ipfw/ip_fw_sockopt.c stable/9/sys/netinet/ipfw/ip_fw_table.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/modules/Makefile ============================================================================== --- stable/9/sys/modules/Makefile Sun Nov 6 17:30:32 2011 (r227231) +++ stable/9/sys/modules/Makefile Sun Nov 6 17:31:57 2011 (r227232) @@ -136,7 +136,7 @@ SUBDIR= ${_3dfx} \ ${_io} \ ipdivert \ ${_ipfilter} \ - ipfw \ + ${_ipfw} \ ipfw_nat \ ${_ipmi} \ ip_mroute_mod \ @@ -377,6 +377,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 Modified: stable/9/sys/modules/ipfw/Makefile ============================================================================== --- stable/9/sys/modules/ipfw/Makefile Sun Nov 6 17:30:32 2011 (r227231) +++ stable/9/sys/modules/ipfw/Makefile Sun Nov 6 17:31:57 2011 (r227232) @@ -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 Modified: stable/9/sys/netinet/ipfw/ip_fw2.c ============================================================================== --- stable/9/sys/netinet/ipfw/ip_fw2.c Sun Nov 6 17:30:32 2011 (r227231) +++ stable/9/sys/netinet/ipfw/ip_fw2.c Sun Nov 6 17:31:57 2011 (r227232) @@ -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" Modified: stable/9/sys/netinet/ipfw/ip_fw_dynamic.c ============================================================================== --- stable/9/sys/netinet/ipfw/ip_fw_dynamic.c Sun Nov 6 17:30:32 2011 (r227231) +++ stable/9/sys/netinet/ipfw/ip_fw_dynamic.c Sun Nov 6 17:31:57 2011 (r227232) @@ -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 Modified: stable/9/sys/netinet/ipfw/ip_fw_log.c ============================================================================== --- stable/9/sys/netinet/ipfw/ip_fw_log.c Sun Nov 6 17:30:32 2011 (r227231) +++ stable/9/sys/netinet/ipfw/ip_fw_log.c Sun Nov 6 17:31:57 2011 (r227232) @@ -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 Modified: stable/9/sys/netinet/ipfw/ip_fw_pfil.c ============================================================================== --- stable/9/sys/netinet/ipfw/ip_fw_pfil.c Sun Nov 6 17:30:32 2011 (r227231) +++ stable/9/sys/netinet/ipfw/ip_fw_pfil.c Sun Nov 6 17:31:57 2011 (r227232) @@ -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 Modified: stable/9/sys/netinet/ipfw/ip_fw_sockopt.c ============================================================================== --- stable/9/sys/netinet/ipfw/ip_fw_sockopt.c Sun Nov 6 17:30:32 2011 (r227231) +++ stable/9/sys/netinet/ipfw/ip_fw_sockopt.c Sun Nov 6 17:31:57 2011 (r227232) @@ -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 Modified: stable/9/sys/netinet/ipfw/ip_fw_table.c ============================================================================== --- stable/9/sys/netinet/ipfw/ip_fw_table.c Sun Nov 6 17:30:32 2011 (r227231) +++ stable/9/sys/netinet/ipfw/ip_fw_table.c Sun Nov 6 17:31:57 2011 (r227232) @@ -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