From: Martin Willi Date: Thu, 8 Feb 2007 13:53:41 +0000 (-0000) Subject: be more liberal in accepting notifies with a protocol id X-Git-Tag: 4.0.7~58 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eb9a3fd6f08f8160e96ebc9ec5c7c07b93aa6565;p=thirdparty%2Fstrongswan.git be more liberal in accepting notifies with a protocol id --- diff --git a/src/charon/encoding/payloads/notify_payload.c b/src/charon/encoding/payloads/notify_payload.c index d943b215c9..b11d8f2069 100644 --- a/src/charon/encoding/payloads/notify_payload.c +++ b/src/charon/encoding/payloads/notify_payload.c @@ -191,15 +191,8 @@ static status_t verify(private_notify_payload_t *this) { case PROTO_NONE: case PROTO_IKE: - break; case PROTO_AH: case PROTO_ESP: - if (this->spi.len != 4) - { - DBG1(DBG_ENC, "Invalid SPI size for %N", - protocol_id_names, this->protocol_id); - return FAILED; - } break; default: DBG1(DBG_ENC, "Unknown protocol (%d)", this->protocol_id); @@ -364,10 +357,14 @@ static u_int32_t get_spi(private_notify_payload_t *this) { case PROTO_AH: case PROTO_ESP: - return *((u_int32_t*)this->spi.ptr); + if (this->spi.len == 4) + { + return *((u_int32_t*)this->spi.ptr); + } default: - return 0; + break; } + return 0; } /**