mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-12 03:37:23 +00:00
lowpan6.c: Fix IEEE 802.15.4 address setting
Reverts a regression introduced in
3a8af612b3
:
Use hardware address fetched from neighbor cache *not* the hardware
address of the interface as destination address.
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
This commit is contained in:
parent
a5c00e369d
commit
a47d30ffc7
@ -630,11 +630,11 @@ lowpan6_output(struct netif *netif, struct pbuf *q, const ip6_addr_t *ip6addr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Send out the packet using the returned hardware address. */
|
/* Send out the packet using the returned hardware address. */
|
||||||
result = lowpan6_hwaddr_to_addr(netif, &dest);
|
dest.addr_len = netif->hwaddr_len;
|
||||||
if (result != ERR_OK) {
|
/* XXX: Inferring the length of the source address from the destination address
|
||||||
MIB2_STATS_NETIF_INC(netif, ifoutdiscards);
|
* is not correct for IEEE 802.15.4, but currently we don't get this information
|
||||||
return result;
|
* from the neighbor cache */
|
||||||
}
|
SMEMCPY(dest.addr, hwaddr, netif->hwaddr_len);
|
||||||
MIB2_STATS_NETIF_INC(netif, ifoutucastpkts);
|
MIB2_STATS_NETIF_INC(netif, ifoutucastpkts);
|
||||||
return lowpan6_frag(netif, q, &src, &dest);
|
return lowpan6_frag(netif, q, &src, &dest);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user