mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-05 00:00:45 -04:00
Raise an alert if allocating virtual IPs fails
This commit is contained in:
parent
f285b9efc8
commit
45d6134218
@ -122,6 +122,8 @@ enum alert_t {
|
||||
ALERT_UNIQUE_REPLACE,
|
||||
/** IKE_SA deleted because of "keep" unique policy, no arguement */
|
||||
ALERT_UNIQUE_KEEP,
|
||||
/** allocating virtual IP failed, linked_list_t of host_t requested */
|
||||
ALERT_VIP_FAILURE,
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -380,6 +380,7 @@ METHOD(task_t, build_r, status_t,
|
||||
{
|
||||
DBG1(DBG_IKE, "no virtual IP found, sending %N",
|
||||
notify_type_names, INTERNAL_ADDRESS_FAILURE);
|
||||
charon->bus->alert(charon->bus, ALERT_VIP_FAILURE, this->vips);
|
||||
message->add_notify(message, FALSE, INTERNAL_ADDRESS_FAILURE,
|
||||
chunk_empty);
|
||||
vips->destroy_offset(vips, offsetof(host_t, destroy));
|
||||
@ -390,6 +391,7 @@ METHOD(task_t, build_r, status_t,
|
||||
{
|
||||
DBG1(DBG_IKE, "expected a virtual IP request, sending %N",
|
||||
notify_type_names, FAILED_CP_REQUIRED);
|
||||
charon->bus->alert(charon->bus, ALERT_VIP_FAILURE, this->vips);
|
||||
message->add_notify(message, FALSE, FAILED_CP_REQUIRED, chunk_empty);
|
||||
vips->destroy_offset(vips, offsetof(host_t, destroy));
|
||||
pools->destroy(pools);
|
||||
|
Loading…
x
Reference in New Issue
Block a user