mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
Merge pull request https://github.com/RIOT-OS/applications/pull/54 from gebart/sniffer/pkt-next-nullptr
sniffer: Check for missing netif header in dump_pkt
This commit is contained in:
commit
fd81987a76
@ -55,10 +55,14 @@ static char rawdmp_stack[THREAD_STACKSIZE_SMALL];
|
|||||||
void dump_pkt(gnrc_pktsnip_t *pkt)
|
void dump_pkt(gnrc_pktsnip_t *pkt)
|
||||||
{
|
{
|
||||||
gnrc_pktsnip_t *snip = pkt;
|
gnrc_pktsnip_t *snip = pkt;
|
||||||
gnrc_netif_hdr_t *netif_hdr = pkt->next->data;
|
uint8_t lqi = 0;
|
||||||
uint8_t lqi = netif_hdr->lqi;
|
if (pkt->next) {
|
||||||
|
if (pkt->next->type == GNRC_NETTYPE_NETIF) {
|
||||||
pkt = gnrc_pktbuf_remove_snip(pkt, pkt->next);
|
gnrc_netif_hdr_t *netif_hdr = pkt->next->data;
|
||||||
|
lqi = netif_hdr->lqi;
|
||||||
|
pkt = gnrc_pktbuf_remove_snip(pkt, pkt->next);
|
||||||
|
}
|
||||||
|
}
|
||||||
uint64_t now_us = xtimer_usec_from_ticks64(xtimer_now64());
|
uint64_t now_us = xtimer_usec_from_ticks64(xtimer_now64());
|
||||||
|
|
||||||
print_str("rftest-rx --- len ");
|
print_str("rftest-rx --- len ");
|
||||||
|
Loading…
Reference in New Issue
Block a user