diff options
author | Philipp Tölke <toelke@in.tum.de> | 2011-06-15 07:15:46 +0000 |
---|---|---|
committer | Philipp Tölke <toelke@in.tum.de> | 2011-06-15 07:15:46 +0000 |
commit | 995c6a248f7254183abf347846cad0c37de03895 (patch) | |
tree | 8b96807cab2dc8251c9acb52fcad243909aafa21 | |
parent | 28bd1a2efc17255c7bfbb21f47ec52b83ff209e8 (diff) | |
download | gnunet-995c6a248f7254183abf347846cad0c37de03895.tar.gz gnunet-995c6a248f7254183abf347846cad0c37de03895.zip |
Do not send too big mesh-hello-messages
-rw-r--r-- | src/mesh/mesh_api.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesh/mesh_api.c b/src/mesh/mesh_api.c index 125ca0500..996c8303c 100644 --- a/src/mesh/mesh_api.c +++ b/src/mesh/mesh_api.c | |||
@@ -188,6 +188,8 @@ send_hello_message (void *cls, size_t size, void *buf) | |||
188 | 188 | ||
189 | size_t sent = sizeof(struct GNUNET_MessageHeader) + handle->hello_message_size; | 189 | size_t sent = sizeof(struct GNUNET_MessageHeader) + handle->hello_message_size; |
190 | 190 | ||
191 | if (sent > size) return 0; | ||
192 | |||
191 | hdr->type = htons(GNUNET_MESSAGE_TYPE_MESH_HELLO); | 193 | hdr->type = htons(GNUNET_MESSAGE_TYPE_MESH_HELLO); |
192 | hdr->size = htons(size); | 194 | hdr->size = htons(size); |
193 | 195 | ||