two %any IDs are equal
authorMartin Willi <martin@strongswan.org>
Wed, 11 Apr 2007 07:43:23 +0000 (07:43 -0000)
committerMartin Willi <martin@strongswan.org>
Wed, 11 Apr 2007 07:43:23 +0000 (07:43 -0000)
src/libstrongswan/utils/identification.c

index 341af39..8c2f4f3 100644 (file)
@@ -738,8 +738,15 @@ static bool contains_wildcards(private_identification_t *this)
  */
 static bool equals_binary(private_identification_t *this, private_identification_t *other)
 {
-       return this->type == other->type && 
-                                                       chunk_equals(this->encoded, other->encoded);
+       if (this->type == other->type)
+       {
+               if (this->type == ID_ANY)
+               {
+                       return TRUE;
+               }
+               return chunk_equals(this->encoded, other->encoded);
+       }
+       return FALSE;                                           
 }
 
 /**