svn commit: r193505 - in user/luigi/ipfw_80/sys: net netinet

Luigi Rizzo luigi at FreeBSD.org
Fri Jun 5 14:04:37 UTC 2009


Author: luigi
Date: Fri Jun  5 14:04:36 2009
New Revision: 193505
URL: http://svn.freebsd.org/changeset/base/193505

Log:
  sync ipfw-related changes with head

Modified:
  user/luigi/ipfw_80/sys/net/if_bridge.c
  user/luigi/ipfw_80/sys/net/if_ethersubr.c
  user/luigi/ipfw_80/sys/netinet/ip_var.h

Modified: user/luigi/ipfw_80/sys/net/if_bridge.c
==============================================================================
--- user/luigi/ipfw_80/sys/net/if_bridge.c	Fri Jun  5 13:55:33 2009	(r193504)
+++ user/luigi/ipfw_80/sys/net/if_bridge.c	Fri Jun  5 14:04:36 2009	(r193505)
@@ -3041,7 +3041,7 @@ bridge_pfil(struct mbuf **mp, struct ifn
 			goto bad;
 	}
 
-	if (IPFW_LOADED && pfil_ipfw != 0 && dir == PFIL_OUT && ifp != NULL) {
+	if (ip_fw_chk_ptr && pfil_ipfw != 0 && dir == PFIL_OUT && ifp != NULL) {
 		INIT_VNET_INET(curvnet);
 
 		error = -1;

Modified: user/luigi/ipfw_80/sys/net/if_ethersubr.c
==============================================================================
--- user/luigi/ipfw_80/sys/net/if_ethersubr.c	Fri Jun  5 13:55:33 2009	(r193504)
+++ user/luigi/ipfw_80/sys/net/if_ethersubr.c	Fri Jun  5 14:04:36 2009	(r193505)
@@ -436,7 +436,7 @@ ether_output_frame(struct ifnet *ifp, st
 	INIT_VNET_NET(ifp->if_vnet);
 	struct ip_fw *rule = ip_dn_claim_rule(m);
 
-	if (IPFW_LOADED && V_ether_ipfw != 0) {
+	if (ip_fw_chk_ptr && V_ether_ipfw != 0) {
 		if (ether_ipfw_chk(&m, ifp, &rule, 0) == 0) {
 			if (m) {
 				m_freem(m);
@@ -770,7 +770,7 @@ ether_demux(struct ifnet *ifp, struct mb
 	 * Allow dummynet and/or ipfw to claim the frame.
 	 * Do not do this for PROMISC frames in case we are re-entered.
 	 */
-	if (IPFW_LOADED && V_ether_ipfw != 0 && !(m->m_flags & M_PROMISC)) {
+	if (ip_fw_chk_ptr && V_ether_ipfw != 0 && !(m->m_flags & M_PROMISC)) {
 		struct ip_fw *rule = ip_dn_claim_rule(m);
 
 		if (ether_ipfw_chk(&m, NULL, &rule, 0) == 0) {

Modified: user/luigi/ipfw_80/sys/netinet/ip_var.h
==============================================================================
--- user/luigi/ipfw_80/sys/netinet/ip_var.h	Fri Jun  5 13:55:33 2009	(r193504)
+++ user/luigi/ipfw_80/sys/netinet/ip_var.h	Fri Jun  5 14:04:36 2009	(r193505)
@@ -224,16 +224,13 @@ extern	struct pfil_head inet_pfil_hook;	
 
 void	in_delayed_cksum(struct mbuf *m);
 
-/* ipfw and dummynet hooks */
-extern int (*ip_fw_ctl_ptr)(struct sockopt *);
+/* ipfw and dummynet hooks. Most are declared in raw_ip.c */
 struct ip_fw_args;
-extern  int (*ip_fw_chk_ptr)(struct ip_fw_args *args);
-#define IPFW_LOADED     (ip_fw_chk_ptr != NULL)
-
-extern  int (*ip_dn_ctl_ptr)(struct sockopt *); /* raw_ip.c */
-extern int (*ip_dn_io_ptr)(struct mbuf **m, int dir, struct ip_fw_args *fwa);
-//typedef void ip_dn_ruledel_t(void *); /* ip_fw_pfil.c */
-extern  void (*ip_dn_ruledel_ptr)(void *); /* ip_fw_pfil.c */
+extern int	(*ip_fw_chk_ptr)(struct ip_fw_args *args);
+extern int	(*ip_fw_ctl_ptr)(struct sockopt *);
+extern int	(*ip_dn_ctl_ptr)(struct sockopt *);
+extern int	(*ip_dn_io_ptr)(struct mbuf **m, int dir, struct ip_fw_args *fwa);
+extern void	(*ip_dn_ruledel_ptr)(void *);		/* in ip_fw2.c */
 #endif /* _KERNEL */
 
 #endif /* !_NETINET_IP_VAR_H_ */


More information about the svn-src-user mailing list