framer-802154: Sequence number fix

This commit is contained in:
kkrentz 2013-05-27 06:30:14 -07:00
parent 9dc9e4bd9f
commit 1d324e50d2

View File

@ -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);
}