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,
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to