diff options
author | Filip Tehlar <ftehlar@cisco.com> | 2021-02-04 17:07:30 +0000 |
---|---|---|
committer | Beno�t Ganne <bganne@cisco.com> | 2021-02-05 12:17:03 +0000 |
commit | b8ce5b784c8852f274ac25a22ee6d8806c2fab2e (patch) | |
tree | bcaafbfb88a0b782a2610243ac083e989f7fd772 /src/plugins/ikev2 | |
parent | 6a999d67d6e41df0fb9f63f0a379ebd389617a7e (diff) |
ikev2: fix bad ip in logs
Type: fix
Change-Id: Icd01491043e9fd1bb8f51f4f55e1252fd78512de
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'src/plugins/ikev2')
-rw-r--r-- | src/plugins/ikev2/ikev2.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/plugins/ikev2/ikev2.c b/src/plugins/ikev2/ikev2.c index 0236764e637..aa57deb0924 100644 --- a/src/plugins/ikev2/ikev2.c +++ b/src/plugins/ikev2/ikev2.c @@ -1347,13 +1347,17 @@ ikev2_process_create_child_sa_req (vlib_main_t * vm, ikev2_ts_t *tsr = 0; ikev2_sa_proposal_t *proposal = 0; ikev2_child_sa_t *child_sa; - u32 dlen = 0; + u32 dlen = 0, src; u16 plen; - ikev2_elog_exchange ("ispi %lx rspi %lx CREATE_CHILD_SA received " - "from ", clib_host_to_net_u64 (ike->ispi), - clib_host_to_net_u64 (ike->rspi), - ip_addr_v4 (&sa->raddr).as_u32, + if (sa->is_initiator) + src = ip_addr_v4 (&sa->raddr).as_u32; + else + src = ip_addr_v4 (&sa->iaddr).as_u32; + + ikev2_elog_exchange ("ispi %lx rspi %lx CREATE_CHILD_SA received from", + clib_host_to_net_u64 (ike->ispi), + clib_host_to_net_u64 (ike->rspi), src, ip_addr_version (&sa->raddr) == AF_IP4); plaintext = ikev2_decrypt_sk_payload (sa, ike, &payload, len, &dlen); |