Skip to content
Snippets Groups Projects
Commit 01370511 authored by Martine Lenders's avatar Martine Lenders
Browse files

gnrc_sixlowpan_frag: drop received duplicates

Otherwise duplicate fragments are added to the number of already
received datagram bytes in L153 leading to possible race-conditions.
parent 4e4e6f87
Branches
No related tags found
No related merge requests found
...@@ -139,7 +139,12 @@ static int _rbuf_add(gnrc_netif_hdr_t *netif_hdr, gnrc_pktsnip_t *pkt, ...@@ -139,7 +139,12 @@ static int _rbuf_add(gnrc_netif_hdr_t *netif_hdr, gnrc_pktsnip_t *pkt,
* https://tools.ietf.org/html/rfc4944#section-5.3 */ * https://tools.ietf.org/html/rfc4944#section-5.3 */
return RBUF_ADD_REPEAT; return RBUF_ADD_REPEAT;
} }
/* End was already checked in overlap check */
if (ptr->start == offset) {
DEBUG("6lo rbuf: fragment already in reassembly buffer");
gnrc_pktbuf_release(pkt);
return RBUF_ADD_SUCCESS;
}
ptr = ptr->next; ptr = ptr->next;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment