diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/libcharon/encoding/payloads/notify_payload.c | 8 | ||||
-rwxr-xr-x | src/libcharon/encoding/payloads/notify_payload.h | 2 | ||||
-rwxr-xr-x | src/libcharon/sa/ikev1/tasks/informational.c | 21 |
3 files changed, 27 insertions, 4 deletions
diff --git a/src/libcharon/encoding/payloads/notify_payload.c b/src/libcharon/encoding/payloads/notify_payload.c index 7c3aac18f..ade2d945f 100755 --- a/src/libcharon/encoding/payloads/notify_payload.c +++ b/src/libcharon/encoding/payloads/notify_payload.c @@ -111,7 +111,9 @@ ENUM_NEXT(notify_type_names, INITIAL_CONTACT_IKEV1, INITIAL_CONTACT_IKEV1, IPSEC ENUM_NEXT(notify_type_names, DPD_R_U_THERE, DPD_R_U_THERE_ACK, INITIAL_CONTACT_IKEV1, "DPD_R_U_THERE", "DPD_R_U_THERE_ACK"); -ENUM_NEXT(notify_type_names, USE_BEET_MODE, USE_BEET_MODE, DPD_R_U_THERE_ACK, +ENUM_NEXT(notify_type_names, UNITY_LOAD_BALANCE, UNITY_LOAD_BALANCE, DPD_R_U_THERE_ACK, + "UNITY_LOAD_BALANCE"); +ENUM_NEXT(notify_type_names, USE_BEET_MODE, USE_BEET_MODE, UNITY_LOAD_BALANCE, "USE_BEET_MODE"); ENUM_NEXT(notify_type_names, ME_MEDIATION, ME_RESPONSE, USE_BEET_MODE, "ME_MEDIATION", @@ -210,7 +212,9 @@ ENUM_NEXT(notify_type_short_names, INITIAL_CONTACT_IKEV1, INITIAL_CONTACT_IKEV1, ENUM_NEXT(notify_type_short_names, DPD_R_U_THERE, DPD_R_U_THERE_ACK, INITIAL_CONTACT_IKEV1, "DPD", "DPD_ACK"); -ENUM_NEXT(notify_type_short_names, USE_BEET_MODE, USE_BEET_MODE, DPD_R_U_THERE_ACK, +ENUM_NEXT(notify_type_short_names, UNITY_LOAD_BALANCE, UNITY_LOAD_BALANCE, DPD_R_U_THERE_ACK, + "UNITY_LB"); +ENUM_NEXT(notify_type_short_names, USE_BEET_MODE, USE_BEET_MODE, UNITY_LOAD_BALANCE, "BEET_MODE"); ENUM_NEXT(notify_type_short_names, ME_MEDIATION, ME_RESPONSE, USE_BEET_MODE, "ME_MED", diff --git a/src/libcharon/encoding/payloads/notify_payload.h b/src/libcharon/encoding/payloads/notify_payload.h index 597962dd1..58d85ffae 100755 --- a/src/libcharon/encoding/payloads/notify_payload.h +++ b/src/libcharon/encoding/payloads/notify_payload.h @@ -143,6 +143,8 @@ enum notify_type_t { /* IKEv1 DPD */ DPD_R_U_THERE = 36136, DPD_R_U_THERE_ACK = 36137, + /* IKEv1 Cisco High Availability */ + UNITY_LOAD_BALANCE = 40501, /* BEET mode, not even a draft yet. private use */ USE_BEET_MODE = 40961, /* IKE-ME, private use */ diff --git a/src/libcharon/sa/ikev1/tasks/informational.c b/src/libcharon/sa/ikev1/tasks/informational.c index 4e53e5c04..a521aeea6 100755 --- a/src/libcharon/sa/ikev1/tasks/informational.c +++ b/src/libcharon/sa/ikev1/tasks/informational.c @@ -81,10 +81,27 @@ METHOD(task_t, process_r, status_t, this->ike_sa->set_condition(this->ike_sa, COND_INIT_CONTACT_SEEN, TRUE); } + else if (type == UNITY_LOAD_BALANCE) + { + host_t *redirect; + chunk_t data; + + data = notify->get_notification_data(notify); + redirect = host_create_from_chunk(AF_INET, data, 0); + if (redirect) + { + DBG1(DBG_IKE, "received %N notify. redirected to %H", + notify_type_names, type, redirect); + } + else + { + DBG1(DBG_IKE, "received %N notify, invalid address"); + } + } else if (type < 16384) { DBG1(DBG_IKE, "received %N error notify", - notify_type_names, notify->get_notify_type(notify)); + notify_type_names, type); if (this->ike_sa->get_state(this->ike_sa) == IKE_CONNECTING) { /* only critical during main mode */ status = FAILED; @@ -94,7 +111,7 @@ METHOD(task_t, process_r, status_t, else { DBG1(DBG_IKE, "received %N notify", - notify_type_names, notify->get_notify_type(notify)); + notify_type_names, type); } continue; case DELETE_V1: |