- separate multicast payload from control messages
[oweals/gnunet.git] / src / mesh / gnunet-service-mesh.c
index 9db69f2f5cd53d2398afcb32b91362716188ea60..55be9ea443306e8027b9a9632d1eef227f382d41 100644 (file)
@@ -4537,6 +4537,11 @@ queue_get_next (const struct MeshPeerInfo *peer)
         break;
       case GNUNET_MESSAGE_TYPE_MESH_MULTICAST:
         mcast = (struct GNUNET_MESH_Multicast *) info->mesh_data->data;
+        if (GNUNET_MESSAGE_TYPE_MESH_MULTICAST != ntohs(mcast->header.type)) 
+        {
+          // Not a multicast payload: multicast control traffic (destroy, etc)
+          return q;
+        }
         pid = ntohl (mcast->pid);
         GNUNET_PEER_resolve (info->peer->id, &id);
         cinfo = tunnel_get_neighbor_fc(t, &id);