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

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

Log:
  Added code for: O_VERSRCREACH
  

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:12:30 2014	(r269359)
+++ soc2014/dpl/netmap-ipfw/sys/netpfil/ipfw/ip_fw2.c	Tue Jun 10 15:21:33 2014	(r269360)
@@ -1587,14 +1587,7 @@
 				break;
 
 			case O_VERSRCREACH:
-				/* Outgoing packets automatically pass/match */
-				match = (hlen > 0 && ((oif != NULL) ||
-#ifdef INET6
-				    is_ipv6 ?
-				        verify_path6(&(args->f_id.src_ip6),
-				            NULL, args->f_id.fib) :
-#endif
-				    verify_path(src_ip, NULL, args->f_id.fib)));
+				rule_versrcreach(&match, 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:12:30 2014	(r269359)
+++ soc2014/dpl/netmap-ipfw/sys/netpfil/ipfw/ip_rules.h	Tue Jun 10 15:21:33 2014	(r269360)
@@ -564,6 +564,14 @@
 inline void
 rule_versrcreach(int *match, int is_ipv6 struct ip_fw_args *args, struct in_addr *src_ip)
 {
+	/* Outgoing packets automatically pass/match */
+	match = (hlen > 0 && ((oif != NULL) ||
+#ifdef INET6
+	    is_ipv6 ?
+	        verify_path6(&(args->f_id.src_ip6),
+	            NULL, args->f_id.fib) :
+#endif
+	    verify_path(src_ip, NULL, args->f_id.fib)));
 }
 
 inline void



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