From 5d6f8c01a8ec0438d072f9c38b4d9b1ad554a64c Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Fri, 31 Jul 2015 06:58:52 +0000 Subject: [PATCH] - ignore AX KX when we already know the peer's key, not when the state is KEY_OK. This allows the peer to issue a re-key. --- src/cadet/gnunet-service-cadet_tunnel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cadet/gnunet-service-cadet_tunnel.c b/src/cadet/gnunet-service-cadet_tunnel.c index 632ce799c..dc86f7a0f 100644 --- a/src/cadet/gnunet-service-cadet_tunnel.c +++ b/src/cadet/gnunet-service-cadet_tunnel.c @@ -2908,7 +2908,7 @@ handle_kx_ax (struct CadetTunnel *t, const struct GNUNET_CADET_AX_KX *msg) (GNUNET_CADET_AX_KX_FLAG_FORCE_REPLY & ntohl (msg->flags))) GCT_send_ax_kx (t, GNUNET_NO); - if (CADET_TUNNEL_KEY_OK == t->estate) + if (0 == memcmp(&ax->DHRr, &msg->ratchet_key, sizeof(msg->ratchet_key))) return; LOG (GNUNET_ERROR_TYPE_INFO, " is Alice? %s\n", am_I_alice ? "YES" : "NO"); -- 2.25.1