Date: Tue, 4 Oct 2011 11:02:49 +0000 (UTC) From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r225965 - in stable/9/sys: modules/ipfw netinet/ipfw Message-ID: <201110041102.p94B2neP054513@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bz Date: Tue Oct 4 11:02:48 2011 New Revision: 225965 URL: http://svn.freebsd.org/changeset/base/225965 Log: MFC r225793: Unbreak no-ip and no-inet6 module builds with ipfw. For now continue to build the ip_fw_pfil.c hooks and ipfw even in case of no-ip under the assumption that the private L2 hook (which hopefully eventually will be a pfil hook as well) can still be useful. Allow building the module without inet as well. Approved by: re (kib) Modified: stable/9/sys/modules/ipfw/Makefile stable/9/sys/netinet/ipfw/ip_fw_pfil.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/ipfw/Makefile ============================================================================== --- stable/9/sys/modules/ipfw/Makefile Tue Oct 4 10:08:02 2011 (r225964) +++ stable/9/sys/modules/ipfw/Makefile Tue Oct 4 11:02:48 2011 (r225965) @@ -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_inet6.h opt_ipfw.h opt_ipsec.h +SRCS+= opt_inet.h opt_inet6.h opt_ipfw.h opt_ipsec.h CFLAGS+= -DIPFIREWALL CFLAGS+= -I${.CURDIR}/../../contrib/pf @@ -22,6 +22,10 @@ CFLAGS+= -I${.CURDIR}/../../contrib/pf # .if !defined(KERNBUILDDIR) +.if ${MK_INET_SUPPORT} != "no" +opt_inet.h: + echo "#define INET 1" > ${.TARGET} +.endif .if ${MK_INET6_SUPPORT} != "no" opt_inet6.h: echo "#define INET6 1" > ${.TARGET} Modified: stable/9/sys/netinet/ipfw/ip_fw_pfil.c ============================================================================== --- stable/9/sys/netinet/ipfw/ip_fw_pfil.c Tue Oct 4 10:08:02 2011 (r225964) +++ stable/9/sys/netinet/ipfw/ip_fw_pfil.c Tue Oct 4 11:02:48 2011 (r225965) @@ -31,11 +31,11 @@ __FBSDID("$FreeBSD$"); #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 "opt_inet6.h" #include <sys/param.h> #include <sys/systm.h> @@ -154,7 +154,7 @@ again: /* next_hop may be set by ipfw_chk */ if (args.next_hop == NULL && args.next_hop6 == NULL) break; /* pass */ -#ifndef IPFIREWALL_FORWARD +#if !defined(IPFIREWALL_FORWARD) || (!defined(INET6) && !defined(INET)) ret = EACCES; #else { @@ -205,7 +205,7 @@ again: #endif m_tag_prepend(*m0, fwd_tag); } -#endif +#endif /* IPFIREWALL_FORWARD */ break; case IP_FW_DENY:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201110041102.p94B2neP054513>