Fixed verification of DELETE_V1 payloads.

This commit is contained in:
Tobias Brunner
2012-03-20 17:30:50 +01:00
parent f3cc8589b1
commit 1e5dd62bb2
@@ -178,10 +178,19 @@ METHOD(payload_t, verify, status_t,
break; break;
case PROTO_IKE: case PROTO_IKE:
case 0: case 0:
/* IKE deletion has no spi assigned! */ if (this->type == DELETE)
if (this->spi_size != 0) { /* IKEv2 deletion has no spi assigned! */
{ if (this->spi_size != 0)
return FAILED; {
return FAILED;
}
}
else
{ /* IKEv1 uses the two concatenated ISAKMP cookies as SPI */
if (this->spi_size != 16)
{
return FAILED;
}
} }
break; break;
default: default: