diff --git a/sys/net/gnrc/network_layer/ipv6/gnrc_ipv6.c b/sys/net/gnrc/network_layer/ipv6/gnrc_ipv6.c index feb2e8f10f..bc6504fccc 100644 --- a/sys/net/gnrc/network_layer/ipv6/gnrc_ipv6.c +++ b/sys/net/gnrc/network_layer/ipv6/gnrc_ipv6.c @@ -229,6 +229,8 @@ static void *_event_loop(void *args) static void _send_to_iface(gnrc_netif_t *netif, gnrc_pktsnip_t *pkt) { + const ipv6_hdr_t *hdr = pkt->next->data; + assert(netif != NULL); ((gnrc_netif_hdr_t *)pkt->data)->if_pid = netif->pid; if (gnrc_pkt_len(pkt->next) > netif->ipv6.mtu) { @@ -237,6 +239,11 @@ static void _send_to_iface(gnrc_netif_t *netif, gnrc_pktsnip_t *pkt) gnrc_pktbuf_release_error(pkt, EMSGSIZE); return; } + DEBUG("ipv6: Sending (src = %s, ", + ipv6_addr_to_str(addr_str, &hdr->src, sizeof(addr_str))); + DEBUG("dst = %s, next header = %u, length = %u)\n", + ipv6_addr_to_str(addr_str, &hdr->dst, sizeof(addr_str)), hdr->nh, + byteorder_ntohs(hdr->len)); #ifdef MODULE_NETSTATS_IPV6 netif->ipv6.stats.tx_success++; netif->ipv6.stats.tx_bytes += gnrc_pkt_len(pkt->next);