From: Bart Polot Date: Fri, 24 Aug 2012 16:35:57 +0000 (+0000) Subject: - separate multicast payload from control messages X-Git-Tag: initial-import-from-subversion-38251~12095 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=00f9e9d51ce75db87e7dec55da378e1ae495d6da;p=oweals%2Fgnunet.git - separate multicast payload from control messages --- diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c index 9db69f2f5..55be9ea44 100644 --- a/src/mesh/gnunet-service-mesh.c +++ b/src/mesh/gnunet-service-mesh.c @@ -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);