some header shuffling to help decoupling ip_divert from ipfw

This commit is contained in:
Luigi Rizzo 2010-01-07 10:08:05 +00:00
parent 54767bf590
commit 62081e0f8d
5 changed files with 6 additions and 11 deletions

View File

@ -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 */

View File

@ -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>

View File

@ -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 */
}

View File

@ -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, int size)
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;

View File

@ -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>