From 6dc125e08bb5bad8bc51626031e8ca740da2e03f Mon Sep 17 00:00:00 2001 From: Martine Lenders <mail@martine-lenders.eu> Date: Wed, 19 Aug 2015 17:50:08 +0200 Subject: [PATCH] gnrc_sixlowpan: compare with actual packet size for fragmentation Not with the uncompressed version --- sys/net/gnrc/network_layer/sixlowpan/gnrc_sixlowpan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/gnrc/network_layer/sixlowpan/gnrc_sixlowpan.c b/sys/net/gnrc/network_layer/sixlowpan/gnrc_sixlowpan.c index d465e3480a..999552f0ed 100644 --- a/sys/net/gnrc/network_layer/sixlowpan/gnrc_sixlowpan.c +++ b/sys/net/gnrc/network_layer/sixlowpan/gnrc_sixlowpan.c @@ -257,7 +257,7 @@ static void _send(gnrc_pktsnip_t *pkt) /* IP should not send anything here if it is not a 6LoWPAN interface, * so we don't need to check for NULL pointers */ - if (datagram_size <= iface->max_frag_size) { + if (gnrc_pkt_len(pkt2->next) <= iface->max_frag_size) { DEBUG("6lo: Send SND command for %p to %" PRIu16 "\n", (void *)pkt2, hdr->if_pid); gnrc_netapi_send(hdr->if_pid, pkt2); -- GitLab