Repository : ssh://git@open-mesh.org/alfred
On branch : master
commit 60847807d694ee75da0248338893e809d95c2b57 Author: Sven Eckelmann sven@narfation.org Date: Mon Oct 9 17:33:07 2017 +0200
alfred: Only check for minimal length of fixed size packets
These fixed size packets could have some optional information in the future. We should therefore not limit the size of these packets to the size of the non-tlv header.
Signed-off-by: Sven Eckelmann sven@narfation.org Signed-off-by: Simon Wunderlich sw@simonwunderlich.de
60847807d694ee75da0248338893e809d95c2b57 recv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/recv.c b/recv.c index 12bb3f1..e897e3d 100644 --- a/recv.c +++ b/recv.c @@ -284,7 +284,7 @@ process_alfred_announce_master(struct globals *globals, if (announce->header.version != ALFRED_VERSION) return -1;
- if (len != (sizeof(*announce) - sizeof(announce->header))) + if (len < (sizeof(*announce) - sizeof(announce->header))) return -1;
server = hash_find(interface->server_hash, &mac); @@ -320,7 +320,7 @@ static int process_alfred_request(struct globals *globals, if (request->header.version != ALFRED_VERSION) return -1;
- if (len != (sizeof(*request) - sizeof(request->header))) + if (len < (sizeof(*request) - sizeof(request->header))) return -1;
push_data(globals, interface, source, SOURCE_SYNCED, @@ -343,7 +343,7 @@ static int process_alfred_status_txend(struct globals *globals, if (request->header.version != ALFRED_VERSION) return -1;
- if (len != (sizeof(*request) - sizeof(request->header))) + if (len < (sizeof(*request) - sizeof(request->header))) return -1;
if (globals->ipv4mode)