diff options
Diffstat (limited to 'src/cadet/gnunet-service-cadet_tunnel.c')
-rw-r--r-- | src/cadet/gnunet-service-cadet_tunnel.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/cadet/gnunet-service-cadet_tunnel.c b/src/cadet/gnunet-service-cadet_tunnel.c index 3b0f335f2..00c9b4763 100644 --- a/src/cadet/gnunet-service-cadet_tunnel.c +++ b/src/cadet/gnunet-service-cadet_tunnel.c | |||
@@ -2865,7 +2865,8 @@ handle_kx_ax (struct CadetTunnel *t, const struct GNUNET_CADET_AX_KX *msg) | |||
2865 | return; | 2865 | return; |
2866 | } | 2866 | } |
2867 | 2867 | ||
2868 | if (GNUNET_YES == ntohl (msg->force_reply)) | 2868 | if (GNUNET_CADET_AX_KX_FLAG_FORCE_REPLY == |
2869 | (GNUNET_CADET_AX_KX_FLAG_FORCE_REPLY & ntohl (msg->flags))) | ||
2869 | GCT_send_ax_kx (t, GNUNET_NO); | 2870 | GCT_send_ax_kx (t, GNUNET_NO); |
2870 | 2871 | ||
2871 | if (CADET_TUNNEL_KEY_OK == t->estate) | 2872 | if (CADET_TUNNEL_KEY_OK == t->estate) |
@@ -4164,6 +4165,7 @@ void | |||
4164 | GCT_send_ax_kx (struct CadetTunnel *t, int force_reply) | 4165 | GCT_send_ax_kx (struct CadetTunnel *t, int force_reply) |
4165 | { | 4166 | { |
4166 | struct GNUNET_CADET_AX_KX msg; | 4167 | struct GNUNET_CADET_AX_KX msg; |
4168 | enum GNUNET_CADET_AX_KX_Flags flags; | ||
4167 | 4169 | ||
4168 | LOG (GNUNET_ERROR_TYPE_INFO, "===> AX_KX for %s\n", GCT_2s (t)); | 4170 | LOG (GNUNET_ERROR_TYPE_INFO, "===> AX_KX for %s\n", GCT_2s (t)); |
4169 | if (NULL != t->ephm_h) | 4171 | if (NULL != t->ephm_h) |
@@ -4174,7 +4176,10 @@ GCT_send_ax_kx (struct CadetTunnel *t, int force_reply) | |||
4174 | 4176 | ||
4175 | msg.header.size = htons (sizeof (msg)); | 4177 | msg.header.size = htons (sizeof (msg)); |
4176 | msg.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_AX_KX); | 4178 | msg.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_AX_KX); |
4177 | msg.force_reply = htonl (force_reply); | 4179 | flags = GNUNET_CADET_AX_KX_FLAG_NONE; |
4180 | if (force_reply) | ||
4181 | flags |= GNUNET_CADET_AX_KX_FLAG_FORCE_REPLY; | ||
4182 | msg.flags = htonl (flags); | ||
4178 | GNUNET_CRYPTO_ecdhe_key_get_public (t->ax->kx_0, &msg.ephemeral_key); | 4183 | GNUNET_CRYPTO_ecdhe_key_get_public (t->ax->kx_0, &msg.ephemeral_key); |
4179 | GNUNET_CRYPTO_ecdhe_key_get_public (t->ax->DHRs, &msg.ratchet_key); | 4184 | GNUNET_CRYPTO_ecdhe_key_get_public (t->ax->DHRs, &msg.ratchet_key); |
4180 | 4185 | ||