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

gnrc_sixlowpan_frag_vrb: Assert no usage of a vrb with src_len == 0

This commit is contained in:
Felix 2022-10-07 11:59:04 +02:00 committed by Martine Lenders
parent 17c70f7ee0
commit aa27ed71fa
No known key found for this signature in database
GPG Key ID: 2134D77A5336DD80

View File

@ -53,6 +53,7 @@ gnrc_sixlowpan_frag_vrb_t *gnrc_sixlowpan_frag_vrb_add(
gnrc_sixlowpan_frag_vrb_t *vrbe = NULL;
assert(base != NULL);
assert(base->src_len != 0);
assert(out_netif != NULL);
assert(out_dst != NULL);
assert(out_dst_len > 0);
@ -168,6 +169,7 @@ gnrc_sixlowpan_frag_vrb_t *gnrc_sixlowpan_frag_vrb_get(
{
DEBUG("6lo vrb: trying to get entry for (%s, %u)\n",
gnrc_netif_addr_to_str(src, src_len, addr_str), src_tag);
assert(src_len != 0);
for (unsigned i = 0; i < CONFIG_GNRC_SIXLOWPAN_FRAG_VRB_SIZE; i++) {
gnrc_sixlowpan_frag_vrb_t *vrbe = &_vrb[i];
@ -189,6 +191,7 @@ gnrc_sixlowpan_frag_vrb_t *gnrc_sixlowpan_frag_vrb_reverse(
{
DEBUG("6lo vrb: trying to get entry for reverse label switching (%s, %u)\n",
gnrc_netif_addr_to_str(src, src_len, addr_str), tag);
assert(src_len != 0);
for (unsigned i = 0; i < CONFIG_GNRC_SIXLOWPAN_FRAG_VRB_SIZE; i++) {
gnrc_sixlowpan_frag_vrb_t *vrbe = &_vrb[i];