If the 6lowpan layer is currently reassembling a packet, and a non-fragmented packet comes along, this is a sign that one of the fragments were lost (as they normally would arrive back-to-back, in sequence). So we'll grab the non-fragmented packet instead of dropping it.
This commit is contained in:
parent
3788b08780
commit
b31e84649a
@ -1671,7 +1671,12 @@ input(void)
|
|||||||
*/
|
*/
|
||||||
#define PRIORITIZE_NEW_PACKETS 1
|
#define PRIORITIZE_NEW_PACKETS 1
|
||||||
#if PRIORITIZE_NEW_PACKETS
|
#if PRIORITIZE_NEW_PACKETS
|
||||||
if(processed_ip_in_len > 0 && first_fragment
|
|
||||||
|
if(!is_fragment) {
|
||||||
|
/* Prioritize non-fragment packets too. */
|
||||||
|
sicslowpan_len = 0;
|
||||||
|
processed_ip_in_len = 0;
|
||||||
|
} else if(processed_ip_in_len > 0 && first_fragment
|
||||||
&& !rimeaddr_cmp(&frag_sender, packetbuf_addr(PACKETBUF_ADDR_SENDER))) {
|
&& !rimeaddr_cmp(&frag_sender, packetbuf_addr(PACKETBUF_ADDR_SENDER))) {
|
||||||
sicslowpan_len = 0;
|
sicslowpan_len = 0;
|
||||||
processed_ip_in_len = 0;
|
processed_ip_in_len = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user