From owner-svn-src-all@FreeBSD.ORG Tue Sep 27 13:27:17 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 938EB106564A; Tue, 27 Sep 2011 13:27:17 +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 6A7A48FC18; Tue, 27 Sep 2011 13:27:17 +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 p8RDRHSb024692; Tue, 27 Sep 2011 13:27:17 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p8RDRHs8024689; Tue, 27 Sep 2011 13:27:17 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201109271327.p8RDRHs8024689@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 27 Sep 2011 13:27:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225793 - in head/sys: 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: Tue, 27 Sep 2011 13:27:17 -0000 Author: bz Date: Tue Sep 27 13:27:17 2011 New Revision: 225793 URL: http://svn.freebsd.org/changeset/base/225793 Log: 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. Glanced at by: jhb MFC after: 3 days Modified: head/sys/modules/ipfw/Makefile head/sys/netinet/ipfw/ip_fw_pfil.c Modified: head/sys/modules/ipfw/Makefile ============================================================================== --- head/sys/modules/ipfw/Makefile Tue Sep 27 13:20:41 2011 (r225792) +++ head/sys/modules/ipfw/Makefile Tue Sep 27 13:27:17 2011 (r225793) @@ -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: head/sys/netinet/ipfw/ip_fw_pfil.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw_pfil.c Tue Sep 27 13:20:41 2011 (r225792) +++ head/sys/netinet/ipfw/ip_fw_pfil.c Tue Sep 27 13:27:17 2011 (r225793) @@ -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 #include @@ -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: