llsec: Disable duplicate detection when the LLSEC driver provides replay protection anyway.

This commit is contained in:
kkrentz 2014-01-12 04:58:34 -08:00
parent 2687c345cf
commit 41c5dbf961
3 changed files with 15 additions and 0 deletions

View file

@ -44,6 +44,16 @@
#include "contiki-conf.h"
#include "net/mac/mac.h"
#ifdef RDC_CONF_WITH_DUPLICATE_DETECTION
#define RDC_WITH_DUPLICATE_DETECTION RDC_CONF_WITH_DUPLICATE_DETECTION
#else /* RDC_CONF_WITH_DUPLICATE_DETECTION */
/* As frames can be spoofed, the RDC layer should not discard a
frame because it has seen its sequence number already. Replay
protection should be implemented at the LLSEC layer where the
authenticity of frames is verified. */
#define RDC_WITH_DUPLICATE_DETECTION !LLSEC802154_CONF_SECURITY_LEVEL
#endif /* RDC_CONF_WITH_DUPLICATE_DETECTION */
/* List of packets to be sent by RDC layer */
struct rdc_buf_list {
struct rdc_buf_list *next;