diff --git a/core/net/mac/framer-802154.c b/core/net/mac/framer-802154.c index 9f97ff8a2..d934b62a4 100644 --- a/core/net/mac/framer-802154.c +++ b/core/net/mac/framer-802154.c @@ -130,6 +130,10 @@ create_frame(int type, int do_create) params.seq = packetbuf_attr(PACKETBUF_ATTR_MAC_SEQNO); } else { + /* Ensure that the sequence number 0 is not used as it would bypass the above check. */ + if(mac_dsn == 0) { + mac_dsn++; + } params.seq = mac_dsn++; packetbuf_set_attr(PACKETBUF_ATTR_MAC_SEQNO, params.seq); }