svn commit: r201732 - head/sys/netinet/ipfw
Luigi Rizzo
luigi at FreeBSD.org
Thu Jan 7 10:08:06 UTC 2010
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 <sys/param.h>
@@ -75,10 +73,10 @@ __FBSDID("$FreeBSD$");
#include <net/netisr.h>
#include <netinet/in.h>
#include <netinet/ip.h> /* ip_len, ip_off */
+#include <netinet/ip_var.h> /* ip_output(), IP_FORWARDING */
#include <netinet/ip_fw.h>
#include <netinet/ipfw/ip_fw_private.h>
#include <netinet/ip_dummynet.h>
-#include <netinet/ip_var.h> /* ip_output(), IP_FORWARDING */
#include <netinet/if_ether.h> /* 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 <netinet/in.h>
#include <netinet/ip.h>
#include <netinet/ip_icmp.h>
+#include <netinet/ip_var.h>
#include <netinet/ip_fw.h>
#include <netinet/ipfw/ip_fw_private.h>
#include <netinet/tcp_var.h>
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 <net/vnet.h>
#include <netinet/in.h>
+#include <netinet/ip_var.h> /* hooks */
#include <netinet/ip_fw.h>
#include <netinet/ipfw/ip_fw_private.h>
@@ -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 <net/vnet.h>
#include <netinet/in.h>
+#include <netinet/ip_var.h> /* struct ipfw_rule_ref */
#include <netinet/ip_fw.h>
#include <netinet/ipfw/ip_fw_private.h>
More information about the svn-src-head
mailing list