do not respond to BROKEN messages with BROKEN messages
authorChristian Grothoff <christian@grothoff.org>
Thu, 16 Feb 2017 20:00:07 +0000 (21:00 +0100)
committerChristian Grothoff <christian@grothoff.org>
Thu, 16 Feb 2017 20:00:07 +0000 (21:00 +0100)
src/cadet/gnunet-service-cadet-new_core.c

index 8886e7a611941464fb853c2727b5683ae679fc54..05fe5f49f56f1d9fbc28c935383bcf1a9a8083d2 100644 (file)
@@ -368,6 +368,13 @@ route_message (struct CadetPeer *prev,
          ntohs (msg->type),
          GCP_2s (prev),
          GNUNET_sh2s (&cid->connection_of_tunnel));
+    switch (ntohs (msg->type))
+    {
+    case GNUNET_MESSAGE_TYPE_CADET_CONNECTION_DESTROY:
+    case GNUNET_MESSAGE_TYPE_CADET_CONNECTION_BROKEN:
+      /* No need to respond to these! */
+      return;
+    }
     env = GNUNET_MQ_msg (bm,
                          GNUNET_MESSAGE_TYPE_CADET_CONNECTION_BROKEN);
     bm->cid = *cid;