1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-24 22:13:52 +01:00

Merge pull request #10950 from miri64/gnrc_sixlowpan_iphc/fix/compressible

gnrc_sixlowpan_iphc: fix _compressible()
This commit is contained in:
Peter Kietzmann 2019-02-05 17:38:03 +01:00 committed by GitHub
commit c04adf6b1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -647,8 +647,8 @@ static inline bool _compressible(gnrc_pktsnip_t *hdr)
case GNRC_NETTYPE_IPV6:
#if defined(MODULE_GNRC_SIXLOWPAN_IPHC_NHC) && defined(MODULE_GNRC_UDP)
case GNRC_NETTYPE_UDP:
return true;
#endif
return true;
default:
return false;
}
@ -705,6 +705,9 @@ void gnrc_sixlowpan_iphc_send(gnrc_pktsnip_t *pkt, void *ctx, unsigned page)
dispatch = ptr; /* use dispatch as temporary point for prev */
ptr = ptr->next;
}
/* there should be at least one compressible header in `pkt`, otherwise this
* function should not be called */
assert(dispatch_size > 0);
ipv6_hdr = pkt->next->data;
dispatch = gnrc_pktbuf_add(NULL, NULL, dispatch_size,
GNRC_NETTYPE_SIXLOWPAN);