Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Jan 2010 08:39:48 +0000 (UTC)
From:      Hajimu UMEMOTO <ume@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r202459 - head/sys/netinet/ipfw
Message-ID:  <201001170839.o0H8dmYY064540@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ume
Date: Sun Jan 17 08:39:48 2010
New Revision: 202459
URL: http://svn.freebsd.org/changeset/base/202459

Log:
  Change 'me' to match any IPv6 address configured on an interface in
  the system as well as any IPv4 address.
  
  Reviewed by:	David Horn <dhorn2000__at__gmail.com>, luigi, qingli
  MFC after:	2 weeks

Modified:
  head/sys/netinet/ipfw/ip_fw2.c

Modified: head/sys/netinet/ipfw/ip_fw2.c
==============================================================================
--- head/sys/netinet/ipfw/ip_fw2.c	Sun Jan 17 08:12:28 2010	(r202458)
+++ head/sys/netinet/ipfw/ip_fw2.c	Sun Jan 17 08:39:48 2010	(r202459)
@@ -1390,7 +1390,14 @@ do {								\
 
 					INADDR_TO_IFP(src_ip, tif);
 					match = (tif != NULL);
+					break;
 				}
+				/* FALLTHROUGH */
+#ifdef INET6
+			case O_IP6_SRC_ME:
+				match = is_ipv6 &&
+				    search_ip6_addr_net(&args->f_id.src_ip6);
+#endif
 				break;
 
 			case O_IP_DST_SET:
@@ -1423,7 +1430,14 @@ do {								\
 
 					INADDR_TO_IFP(dst_ip, tif);
 					match = (tif != NULL);
+					break;
 				}
+				/* FALLTHROUGH */
+#ifdef INET6
+			case O_IP6_DST_ME:
+				match = is_ipv6 &&
+				    search_ip6_addr_net(&args->f_id.dst_ip6);
+#endif
 				break;
 
 			case O_IP_SRCPORT:
@@ -1691,14 +1705,6 @@ do {								\
 				}
 				break;
 
-			case O_IP6_SRC_ME:
-				match= is_ipv6 && search_ip6_addr_net(&args->f_id.src_ip6);
-				break;
-
-			case O_IP6_DST_ME:
-				match= is_ipv6 && search_ip6_addr_net(&args->f_id.dst_ip6);
-				break;
-
 			case O_FLOW6ID:
 				match = is_ipv6 &&
 				    flow6id_match(args->f_id.flow_id6,



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