From owner-svn-src-all@FreeBSD.ORG Thu Jan 7 10:08:06 2010 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 F17FB106566C; Thu, 7 Jan 2010 10:08:05 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E0C598FC13; Thu, 7 Jan 2010 10:08:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o07A8556016709; Thu, 7 Jan 2010 10:08:05 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o07A85KV016703; Thu, 7 Jan 2010 10:08:05 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201001071008.o07A85KV016703@svn.freebsd.org> From: Luigi Rizzo Date: Thu, 7 Jan 2010 10:08:05 +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: r201732 - head/sys/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: Thu, 07 Jan 2010 10:08:06 -0000 Author: luigi Date: Thu Jan 7 10:08:05 2010 New Revision: 201732 URL: http://svn.freebsd.org/changeset/base/201732 Log: some header shuffling to help decoupling ip_divert from ipfw Modified: head/sys/netinet/ipfw/ip_dummynet.c head/sys/netinet/ipfw/ip_fw_log.c head/sys/netinet/ipfw/ip_fw_pfil.c head/sys/netinet/ipfw/ip_fw_sockopt.c head/sys/netinet/ipfw/ip_fw_table.c Modified: head/sys/netinet/ipfw/ip_dummynet.c ============================================================================== --- head/sys/netinet/ipfw/ip_dummynet.c Thu Jan 7 10:06:09 2010 (r201731) +++ head/sys/netinet/ipfw/ip_dummynet.c Thu Jan 7 10:08:05 2010 (r201732) @@ -52,8 +52,6 @@ __FBSDID("$FreeBSD$"); * 000601: WF2Q support * 000106: large rewrite, use heaps to handle very many pipes. * 980513: initial release - * - * include files marked with XXX are probably not needed */ #include @@ -75,10 +73,10 @@ __FBSDID("$FreeBSD$"); #include #include #include /* ip_len, ip_off */ +#include /* ip_output(), IP_FORWARDING */ #include #include #include -#include /* ip_output(), IP_FORWARDING */ #include /* various ether_* routines */ Modified: head/sys/netinet/ipfw/ip_fw_log.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw_log.c Thu Jan 7 10:06:09 2010 (r201731) +++ head/sys/netinet/ipfw/ip_fw_log.c Thu Jan 7 10:08:05 2010 (r201732) @@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/netinet/ipfw/ip_fw_pfil.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw_pfil.c Thu Jan 7 10:06:09 2010 (r201731) +++ head/sys/netinet/ipfw/ip_fw_pfil.c Thu Jan 7 10:08:05 2010 (r201732) @@ -73,12 +73,6 @@ static VNET_DEFINE(int, fw6_enable) = 1; int ipfw_chg_hook(SYSCTL_HANDLER_ARGS); -/* Divert hooks. */ -void (*ip_divert_ptr)(struct mbuf *m, int incoming); - -/* ng_ipfw hooks. */ -ng_ipfw_input_t *ng_ipfw_input_p = NULL; - /* Forward declarations. */ static int ipfw_divert(struct mbuf **, int, struct ipfw_rule_ref *, int); @@ -219,7 +213,7 @@ again: case IP_FW_NGTEE: case IP_FW_NETGRAPH: - if (!NG_IPFW_LOADED) { + if (ng_ipfw_input_p == NULL) { ret = EACCES; break; /* i.e. drop */ } Modified: head/sys/netinet/ipfw/ip_fw_sockopt.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw_sockopt.c Thu Jan 7 10:06:09 2010 (r201731) +++ head/sys/netinet/ipfw/ip_fw_sockopt.c Thu Jan 7 10:08:05 2010 (r201732) @@ -63,6 +63,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include /* hooks */ #include #include @@ -676,7 +677,7 @@ check_ipfw_struct(struct ip_fw *rule, in goto check_size; case O_NETGRAPH: case O_NGTEE: - if (!NG_IPFW_LOADED) + if (ng_ipfw_input_p == NULL) return EINVAL; else goto check_size; Modified: head/sys/netinet/ipfw/ip_fw_table.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw_table.c Thu Jan 7 10:06:09 2010 (r201731) +++ head/sys/netinet/ipfw/ip_fw_table.c Thu Jan 7 10:08:05 2010 (r201732) @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include /* struct ipfw_rule_ref */ #include #include