// Skip if the spi doesn't match
if (optionalIndex != NULL && ike_session_getph1byindex(p, optionalIndex) == NULL) {
continue;
// Skip if the spi doesn't match
if (optionalIndex != NULL && ike_session_getph1byindex(p, optionalIndex) == NULL) {
continue;