mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-05 00:00:45 -04:00
Raise a bus alert when a received message contains unknown SPIs
This commit is contained in:
parent
47904e3c74
commit
f6f16131d0
@ -92,6 +92,8 @@ enum alert_t {
|
||||
ALERT_PEER_ADDR_FAILED,
|
||||
/** peer did not respond to initial message, current try (int, 0-based) */
|
||||
ALERT_PEER_INIT_UNREACHABLE,
|
||||
/** received IKE message with invalid SPI, argument is message_t* */
|
||||
ALERT_INVALID_IKE_SPI,
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -1274,6 +1274,10 @@ METHOD(ike_sa_manager_t, checkout_by_message, ike_sa_t*,
|
||||
}
|
||||
unlock_single_segment(this, segment);
|
||||
}
|
||||
else
|
||||
{
|
||||
charon->bus->alert(charon->bus, ALERT_INVALID_IKE_SPI, message);
|
||||
}
|
||||
id->destroy(id);
|
||||
charon->bus->set_sa(charon->bus, ike_sa);
|
||||
return ike_sa;
|
||||
|
Loading…
x
Reference in New Issue
Block a user