added ID_ANY check to matches_binary()
authorAndreas Steffen <andreas.steffen@strongswan.org>
Mon, 25 Sep 2006 06:19:40 +0000 (06:19 -0000)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Mon, 25 Sep 2006 06:19:40 +0000 (06:19 -0000)
src/libstrongswan/utils/identification.c

index e193a3e..4fbda0a 100644 (file)
@@ -715,6 +715,11 @@ static bool equals_dn(private_identification_t *this, private_identification_t *
 static bool matches_binary(private_identification_t *this, private_identification_t *other,
        int *wildcards)
 {      
+       if (other->type == ID_ANY)
+       {
+               *wildcards = MAX_WILDCARDS;
+               return TRUE;
+       }
        *wildcards = 0;
        return this->type == other->type && chunk_equals(this->encoded, other->encoded);
 }