5013200 ipclassifier bind list insertion order is flawed in some cases
authorethindra
Mon, 11 Jul 2005 11:11:42 -0700
changeset 153 b7f7b242faa2
parent 152 876f214bcfb7
child 154 7a745d3804a2
5013200 ipclassifier bind list insertion order is flawed in some cases
usr/src/uts/common/inet/ip/ipclassifier.c
--- a/usr/src/uts/common/inet/ip/ipclassifier.c	Sat Jul 09 21:32:50 2005 -0700
+++ b/usr/src/uts/common/inet/ip/ipclassifier.c	Mon Jul 11 11:11:42 2005 -0700
@@ -20,7 +20,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -703,18 +703,10 @@
 	IPCL_HASH_REMOVE((connp));					\
 	mutex_enter(&(connfp)->connf_lock);				\
 	nconnp = (connfp)->connf_head;					\
-	if ((connp)->conn_flags & IPCL_ISV6) {				\
-		while (nconnp != NULL &&				\
-		    !IN6_IS_ADDR_UNSPECIFIED(&nconnp->conn_srcv6)) {	\
-			pconnp = nconnp;				\
-			nconnp = nconnp->conn_next;			\
-		}							\
-	} else {							\
-		while (nconnp != NULL &&                                \
-		    !IN6_IS_ADDR_V4MAPPED_ANY(&nconnp->conn_srcv6)) {    \
-			pconnp = nconnp;                                \
-			nconnp = nconnp->conn_next;                     \
-		}							\
+	while (nconnp != NULL &&					\
+	    !_IPCL_V4_MATCH_ANY(nconnp->conn_srcv6)) {			\
+		pconnp = nconnp;					\
+		nconnp = nconnp->conn_next;				\
 	}								\
 	if (pconnp != NULL) {						\
 		pconnp->conn_next = (connp);				\