From b31e84649a3139f546f9b5148d886d3a07a63d7e Mon Sep 17 00:00:00 2001 From: Adam Dunkels Date: Fri, 22 Nov 2013 15:12:02 +0100 Subject: [PATCH] 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. --- core/net/sicslowpan.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/net/sicslowpan.c b/core/net/sicslowpan.c index 7e0200418..844064cae 100644 --- a/core/net/sicslowpan.c +++ b/core/net/sicslowpan.c @@ -1671,7 +1671,12 @@ input(void) */ #define PRIORITIZE_NEW_PACKETS 1 #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))) { sicslowpan_len = 0; processed_ip_in_len = 0;