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:
Adam Dunkels 2013-11-22 15:12:02 +01:00
parent 3788b08780
commit b31e84649a

View file

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