gnrc_netif/lorawan: drop netif header on send

This commit is contained in:
Jose Alamos 2021-06-24 15:21:05 +02:00
parent 2a1a2ee1d5
commit 5808a16f23
No known key found for this signature in database
GPG Key ID: F483EB800EF89DD9

View File

@ -311,12 +311,15 @@ static int _send(gnrc_netif_t *netif, gnrc_pktsnip_t *payload)
dst = gnrc_netif_hdr_get_dst_addr(netif_hdr);
assert(payload->type == GNRC_NETTYPE_NETIF);
head = payload->next;
port = dst[0];
if (netif_hdr->dst_l2addr_len != sizeof(port)) {
goto end;
}
/* Remove the netif hdr snip and point to the MSDU */
head = gnrc_pktbuf_remove_snip(payload, payload);
}
else {
head = payload;