mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-08 00:02:03 -04:00
ikev1: Accept SPI size of any length <= 16 in ISAKMP proposal
Fixes #533.
This commit is contained in:
parent
a213944d4a
commit
a30e0001e4
@ -361,12 +361,20 @@ METHOD(payload_t, verify, status_t,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PROTO_IKE:
|
case PROTO_IKE:
|
||||||
if (this->spi.len != 0 && this->spi.len != 8)
|
if (this->type == PROPOSAL_SUBSTRUCTURE_V1)
|
||||||
{
|
{
|
||||||
DBG1(DBG_ENC, "invalid SPI length in IKE proposal");
|
if (this->spi.len <= 16)
|
||||||
return FAILED;
|
{ /* according to RFC 2409, section 3.5 anything between
|
||||||
|
* 0 and 16 is fine */
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
else if (this->spi.len == 0 || this->spi.len == 8)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
DBG1(DBG_ENC, "invalid SPI length in IKE proposal");
|
||||||
|
return FAILED;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user