1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

ng_ipv6: fix scope of netif header in multicast

This commit is contained in:
Martine Lenders 2015-04-23 01:43:51 +02:00
parent 8e4edf2b72
commit 99c190d3ae

View File

@ -250,6 +250,8 @@ static void _send_multicast(kernel_pid_t iface, ng_pktsnip_t *pkt,
ng_pktsnip_t *ipv6, ng_pktsnip_t *payload,
bool prep_hdr)
{
ng_pktsnip_t *netif;
/* netif header not present: send over all interfaces */
if (iface == KERNEL_PID_UNDEF) {
size_t ifnum;
@ -267,8 +269,6 @@ static void _send_multicast(kernel_pid_t iface, ng_pktsnip_t *pkt,
ng_pktbuf_hold(pkt, ifnum - 1);
for (size_t i = 0; i < ifnum; i++) {
ng_pktsnip_t *netif;
if (prep_hdr) {
/* need to get second write access (duplication) to fill IPv6
* header interface-local */
@ -313,6 +313,8 @@ static void _send_multicast(kernel_pid_t iface, ng_pktsnip_t *pkt,
}
}
netif = pkt;
_send_multicast_over_iface(iface, pkt, netif);
}
}