Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Jun 2014 15:39:58 GMT
From:      dpl@FreeBSD.org
To:        svn-soc-all@FreeBSD.org
Subject:   socsvn commit: r269361 - soc2014/dpl/netmap-ipfw/sys/netpfil/ipfw
Message-ID:  <201406101539.s5AFdwoo012298@socsvn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dpl
Date: Tue Jun 10 15:39:57 2014
New Revision: 269361
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=269361

Log:
  Corrected a lacking hlen at O_VERSRCREACH. And adding the type to the function arguments.
  

Modified:
  soc2014/dpl/netmap-ipfw/sys/netpfil/ipfw/ip_fw2.c
  soc2014/dpl/netmap-ipfw/sys/netpfil/ipfw/ip_rules.h

Modified: soc2014/dpl/netmap-ipfw/sys/netpfil/ipfw/ip_fw2.c
==============================================================================
--- soc2014/dpl/netmap-ipfw/sys/netpfil/ipfw/ip_fw2.c	Tue Jun 10 15:21:33 2014	(r269360)
+++ soc2014/dpl/netmap-ipfw/sys/netpfil/ipfw/ip_fw2.c	Tue Jun 10 15:39:57 2014	(r269361)
@@ -1587,7 +1587,7 @@
 				break;
 
 			case O_VERSRCREACH:
-				rule_versrcreach(&match, oif, m, is_ipv6, args, scr_ip);
+				rule_versrcreach(&match, hlen, oif, m, is_ipv6, args, scr_ip);
 				break;
 
 			case O_ANTISPOOF:

Modified: soc2014/dpl/netmap-ipfw/sys/netpfil/ipfw/ip_rules.h
==============================================================================
--- soc2014/dpl/netmap-ipfw/sys/netpfil/ipfw/ip_rules.h	Tue Jun 10 15:21:33 2014	(r269360)
+++ soc2014/dpl/netmap-ipfw/sys/netpfil/ipfw/ip_rules.h	Tue Jun 10 15:39:57 2014	(r269361)
@@ -444,7 +444,7 @@
 }
 
 inline void
-rule_tcpopts(int *match, hlen, void *ulp, uint8_t proto, u_short offset, ipfw_insn *cmd);
+rule_tcpopts(int *match, u_int hlen, void *ulp, uint8_t proto, u_short offset, ipfw_insn *cmd);
 {
 	PULLUP_LEN(hlen, ulp, (TCP(ulp)->th_off << 2));
 	*match = (proto == IPPROTO_TCP && offset == 0 &&
@@ -531,7 +531,7 @@
 }
 
 inline void
-rule_log(int *match, struct ip_fw *f, hlen, struct ip_fw_args *args, struct mbuf *m, struct ifnet *oif, u_short offset, u_short ip6f_mf, uint32_t tablearg, struct ip *ip)
+rule_log(int *match, struct ip_fw *f, u_int hlen, struct ip_fw_args *args, struct mbuf *m, struct ifnet *oif, u_short offset, u_short ip6f_mf, uint32_t tablearg, struct ip *ip)
 {
 	ipfw_log(f, hlen, args, m,
 		oif, offset | ip6f_mf, tablearg, ip);
@@ -562,7 +562,7 @@
 }
 
 inline void
-rule_versrcreach(int *match, int is_ipv6 struct ip_fw_args *args, struct in_addr *src_ip)
+rule_versrcreach(int *match, u_int hlen, int is_ipv6 struct ip_fw_args *args, struct in_addr *src_ip)
 {
 	/* Outgoing packets automatically pass/match */
 	match = (hlen > 0 && ((oif != NULL) ||
@@ -575,7 +575,7 @@
 }
 
 inline void
-rule_antispoof(int *match, struct ifnet *oif, hlen, int is_ipv4 struct in_addr *src_ip, int is_ipv6 struct ip_fw_args *args, m)
+rule_antispoof(int *match, struct ifnet *oif, u_int hlen, int is_ipv4 struct in_addr *src_ip, int is_ipv6 struct ip_fw_args *args, m)
 {
 }
 
@@ -702,7 +702,7 @@
 }
 
 inline void
-rule_reject(hlen, int is_ipv4 u_short offset, uint8_t proto, void *void *ulp, struct mbuf *m, struct in_addr *dst_ip, struct ip_fw_args *args, ipfw_insn *cmd, uint16_t iplen struct ip *ip)
+rule_reject(u_int hlen, int is_ipv4 u_short offset, uint8_t proto, void *void *ulp, struct mbuf *m, struct in_addr *dst_ip, struct ip_fw_args *args, ipfw_insn *cmd, uint16_t iplen struct ip *ip)
 {
 }
 
@@ -743,7 +743,7 @@
 
 #ifdef INET6
 inline void
-rule_unreach6(hlen, int is_ipv4 u_short offset, uint8_t proto, icmp6_type, struct mbuf *m, struct ip_fw_args *args, ipfw_insn *cmd, struct ip *ip)
+rule_unreach6(u_int hlen, int is_ipv4 u_short offset, uint8_t proto, icmp6_type, struct mbuf *m, struct ip_fw_args *args, ipfw_insn *cmd, struct ip *ip)
 {
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201406101539.s5AFdwoo012298>