diff options
author | Benoît Ganne <bganne@cisco.com> | 2020-12-14 18:11:22 +0100 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2020-12-14 21:53:08 +0000 |
commit | 6ff0dfa7a2fe792c80541d0630082db325c02467 (patch) | |
tree | e23c10aebb9316fe37b7639e138afadf3b6e2ff9 /src | |
parent | 1474ab355f3f22eefcbc0d66d493557fd15d3dfc (diff) |
ikev2: add reason for deleted sa debug log
Type: improvement
Change-Id: If991165406d10d877aa6c7b2a03b4b741272928c
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/ikev2/ikev2.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/ikev2/ikev2.c b/src/plugins/ikev2/ikev2.c index 258087fe1d5..7aaf4f3e033 100644 --- a/src/plugins/ikev2/ikev2.c +++ b/src/plugins/ikev2/ikev2.c @@ -38,9 +38,9 @@ static int ikev2_delete_tunnel_interface (vnet_main_t * vnm, ikev2_sa_t * sa, ikev2_child_sa_t * child); -#define ikev2_set_state(sa, v) do { \ +#define ikev2_set_state(sa, v, ...) do { \ (sa)->state = v; \ - ikev2_elog_sa_state("ispi %lx SA state changed to " #v, sa->ispi); \ + ikev2_elog_sa_state("ispi %lx SA state changed to " #v __VA_ARGS__, sa->ispi); \ } while(0); typedef struct @@ -1280,7 +1280,7 @@ ikev2_process_auth_req (vlib_main_t * vm, ikev2_sa_t * sa, return 1; malformed: - ikev2_set_state (sa, IKEV2_STATE_DELETED); + ikev2_set_state (sa, IKEV2_STATE_DELETED, ": malformed IKE_AUTH"); return 0; } @@ -2403,7 +2403,7 @@ ikev2_generate_message (vlib_buffer_t * b, ikev2_sa_t * sa, } else { - ikev2_set_state (sa, IKEV2_STATE_DELETED); + ikev2_set_state (sa, IKEV2_STATE_DELETED, ": unexpected IKE_AUTH"); goto done; } } @@ -2433,7 +2433,7 @@ ikev2_generate_message (vlib_buffer_t * b, ikev2_sa_t * sa, /* received N(AUTHENTICATION_FAILED) */ else if (sa->state == IKEV2_STATE_AUTH_FAILED) { - ikev2_set_state (sa, IKEV2_STATE_DELETED); + ikev2_set_state (sa, IKEV2_STATE_DELETED, ": auth failed"); goto done; } /* received unsupported critical payload */ |