From 0fd097f8218be2be8b4cd85e1d0c2de1171b4dda Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Fri, 4 Mar 2016 15:08:51 +0100 Subject: [PATCH] TSCH: bound max packet size to the system's packetbuf size --- core/net/mac/tsch/tsch-packet.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/net/mac/tsch/tsch-packet.h b/core/net/mac/tsch/tsch-packet.h index 24f533a88..c48bd479b 100644 --- a/core/net/mac/tsch/tsch-packet.h +++ b/core/net/mac/tsch/tsch-packet.h @@ -36,6 +36,7 @@ /********** Includes **********/ #include "contiki.h" +#include "net/packetbuf.h" #include "net/mac/tsch/tsch-private.h" #include "net/mac/frame802154.h" #include "net/mac/frame802154e-ie.h" @@ -81,7 +82,7 @@ by default, useful in case of duplicate seqno */ /********** Constants *********/ /* Max TSCH packet lenght */ -#define TSCH_PACKET_MAX_LEN 127 +#define TSCH_PACKET_MAX_LEN MIN(127,PACKETBUF_SIZE) /********** Functions *********/