From 1a511352113b4423415a85b3025078a9d43bca1a Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Wed, 22 Apr 2015 21:33:31 +0200 Subject: [PATCH] [SQUASH ME] ng_ipv6: postpone ipv6 header assignment due to duplication --- sys/net/network_layer/ng_ipv6/ng_ipv6.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/net/network_layer/ng_ipv6/ng_ipv6.c b/sys/net/network_layer/ng_ipv6/ng_ipv6.c index c4b249038079..1be514235601 100644 --- a/sys/net/network_layer/ng_ipv6/ng_ipv6.c +++ b/sys/net/network_layer/ng_ipv6/ng_ipv6.c @@ -319,7 +319,7 @@ static void _send_multicast(kernel_pid_t iface, ng_pktsnip_t *pkt, static void _send(ng_pktsnip_t *pkt, bool prep_hdr) { kernel_pid_t iface = KERNEL_PID_UNDEF; - ng_pktsnip_t *ipv6 = pkt, *payload; + ng_pktsnip_t *ipv6, *payload; ng_ipv6_hdr_t *hdr; ng_ipv6_nc_t *nc_entry; @@ -341,6 +341,9 @@ static void _send(ng_pktsnip_t *pkt, bool prep_hdr) iface = ((ng_netif_hdr_t *)pkt->data)->if_pid; ipv6 = pkt->next; } + else { + ipv6 = pkt; + } hdr = ipv6->data; payload = ipv6->next; /* TODO: parse extension headers */