diff options
author | Rene Mayrhofer <rene@mayrhofer.eu.org> | 2007-06-03 17:36:35 +0000 |
---|---|---|
committer | Rene Mayrhofer <rene@mayrhofer.eu.org> | 2007-06-03 17:36:35 +0000 |
commit | 08ee5250bd9c43fda5f24d10b791ca2c4c17fcee (patch) | |
tree | d4e2fc7144e288d624555a38955593e1ee066531 /src/libstrongswan/utils | |
parent | b0d8ed94fe9e74afb49fdf5f11e4add29879c65c (diff) | |
download | vyos-strongswan-08ee5250bd9c43fda5f24d10b791ca2c4c17fcee.tar.gz vyos-strongswan-08ee5250bd9c43fda5f24d10b791ca2c4c17fcee.zip |
[svn-upgrade] Integrating new upstream version, strongswan (4.1.3)
Diffstat (limited to 'src/libstrongswan/utils')
-rw-r--r-- | src/libstrongswan/utils/fetcher.c | 3 | ||||
-rw-r--r-- | src/libstrongswan/utils/host.c | 2 | ||||
-rw-r--r-- | src/libstrongswan/utils/identification.c | 16 |
3 files changed, 17 insertions, 4 deletions
diff --git a/src/libstrongswan/utils/fetcher.c b/src/libstrongswan/utils/fetcher.c index 6165cc1e1..7a06999aa 100644 --- a/src/libstrongswan/utils/fetcher.c +++ b/src/libstrongswan/utils/fetcher.c @@ -25,6 +25,9 @@ #endif /* LIBCURL */ #ifdef LIBLDAP +#ifndef LDAP_DEPRECATED +#define LDAP_DEPRECATED 1 +#endif #include <ldap.h> #endif /* LIBLDAP */ diff --git a/src/libstrongswan/utils/host.c b/src/libstrongswan/utils/host.c index 8cbfd6ab8..68e9c9500 100644 --- a/src/libstrongswan/utils/host.c +++ b/src/libstrongswan/utils/host.c @@ -325,7 +325,7 @@ static bool equals(private_host_t *this, private_host_t *other) { if (!ip_equals(this, other)) { - return FAILED; + return FALSE; } switch (this->address.sa_family) diff --git a/src/libstrongswan/utils/identification.c b/src/libstrongswan/utils/identification.c index 341af39c0..673cbb828 100644 --- a/src/libstrongswan/utils/identification.c +++ b/src/libstrongswan/utils/identification.c @@ -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; } /** @@ -956,7 +963,10 @@ static identification_t *clone_(private_identification_t *this) private_identification_t *clone = identification_create(); clone->type = this->type; - clone->encoded = chunk_clone(this->encoded); + if (this->encoded.len) + { + clone->encoded = chunk_clone(this->encoded); + } clone->public.equals = this->public.equals; clone->public.matches = this->public.matches; |