- fix crash on unexpected malformed PING
authorBart Polot <bart@net.in.tum.de>
Tue, 17 Jun 2014 14:04:23 +0000 (14:04 +0000)
committerBart Polot <bart@net.in.tum.de>
Tue, 17 Jun 2014 14:04:23 +0000 (14:04 +0000)
src/cadet/gnunet-service-cadet_tunnel.c

index 80c19b1a34ac64ef02a853cb3ed23fa36e8a0752..6b9aaa252ec979898aedac4e205405b1a9ee4cad 100644 (file)
@@ -1812,6 +1812,8 @@ handle_ping (struct CadetTunnel *t,
     LOG (GNUNET_ERROR_TYPE_DEBUG, "  e towards %s\n", GNUNET_i2s (&msg->target));
     LOG (GNUNET_ERROR_TYPE_DEBUG, "  got %u\n", res.nonce);
     LOG (GNUNET_ERROR_TYPE_DEBUG, "  towards %s\n", GNUNET_i2s (&res.target));
+    if (NULL == t->kx_ctx)
+      create_kx_ctx (t);
     send_ephemeral (t);
     send_ping (t);
     return;