Moved the link layer destination check to sicslowmac
This commit is contained in:
parent
0c4dc6fc6b
commit
0ad51b8dcc
2 changed files with 9 additions and 13 deletions
|
@ -28,7 +28,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: sicslowmac.c,v 1.3 2009/06/22 11:14:11 nifi Exp $
|
||||
* $Id: sicslowmac.c,v 1.4 2009/09/18 16:37:17 nifi Exp $
|
||||
*/
|
||||
|
||||
|
||||
|
@ -190,10 +190,15 @@ read_packet(void)
|
|||
/* Not broadcast or for our PAN */
|
||||
PRINTF("6MAC: for another pan %u\n", frame.dest_pid);
|
||||
return 0;
|
||||
|
||||
}
|
||||
if(!is_broadcast_addr(frame.fcf.dest_addr_mode, frame.dest_addr.u8)) {
|
||||
packetbuf_set_addr(PACKETBUF_ADDR_RECEIVER, &frame.dest_addr);
|
||||
if(!rimeaddr_cmp(packetbuf_addr(PACKETBUF_ADDR_RECEIVER),
|
||||
&rimeaddr_node_addr)) {
|
||||
/* Not for this node */
|
||||
PRINTF("6MAC: not for us\n");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
packetbuf_set_addr(PACKETBUF_ADDR_SENDER, &frame.src_addr);
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: sicslowpan.c,v 1.8 2009/07/10 13:33:45 dak664 Exp $
|
||||
* $Id: sicslowpan.c,v 1.9 2009/09/18 16:37:17 nifi Exp $
|
||||
*/
|
||||
/**
|
||||
* \file
|
||||
|
@ -1285,15 +1285,6 @@ input(const struct mac_driver *r)
|
|||
}
|
||||
#endif /* SICSLOWPAN_CONF_CONVENTIONAL_MAC */
|
||||
|
||||
#if UIP_CONF_ROUTER
|
||||
if(!rimeaddr_cmp(packetbuf_addr(PACKETBUF_ADDR_RECEIVER),
|
||||
&rimeaddr_node_addr) &&
|
||||
!rimeaddr_cmp(packetbuf_addr(PACKETBUF_ADDR_RECEIVER), &rimeaddr_null)) {
|
||||
PRINTFI("sicslowpan: dropping packet not for us\n");
|
||||
return;
|
||||
}
|
||||
#endif /* UIP_CONF_ROUTER */
|
||||
|
||||
/* init */
|
||||
uncomp_hdr_len = 0;
|
||||
rime_hdr_len = 0;
|
||||
|
@ -1483,7 +1474,7 @@ sicslowpan_init(const struct mac_driver *m)
|
|||
#if SICSLOWPAN_CONF_COMPRESSION == SICSLOWPAN_CONF_COMPRESSION_HC01
|
||||
#if SICSLOWPAN_CONF_MAX_ADDR_CONTEXTS < 1
|
||||
#error sicslowpan compression HC01 requires at least one address context.
|
||||
#error Change SICSLOWPAN_CONF_MAX_ADDR_CONTEXTS int contiki-conf.h.
|
||||
#error Change SICSLOWPAN_CONF_MAX_ADDR_CONTEXTS in contiki-conf.h.
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue