diff --git a/sys/net/link_layer/net_if/net_if.c b/sys/net/link_layer/net_if/net_if.c index 26b48e062ea7a4ea9a4a99a9372fe80c37f59779..8314407c549a0388f15230f99cdc3c315c528ff4 100644 --- a/sys/net/link_layer/net_if/net_if.c +++ b/sys/net/link_layer/net_if/net_if.c @@ -335,7 +335,8 @@ int net_if_send_packet(int if_id, uint16_t target, const void *payload, p.frame.fcf.frame_pend = 0; p.frame.dest_pan_id = net_if_get_pan_id(if_id); - memcpy(p.frame.dest_addr, &target, 2); + uint16_t target_h = NTOHS(target); + memcpy(p.frame.dest_addr, &target_h, 2); response = net_if_transceiver_get_set_handler(if_id, SND_PKT, (void *)&p); } else { @@ -378,7 +379,8 @@ int net_if_send_packet_long(int if_id, net_if_eui64_t *target, p.frame.fcf.frame_type = IEEE_802154_DATA_FRAME; p.frame.fcf.frame_pend = 0; p.frame.dest_pan_id = net_if_get_pan_id(if_id); - memcpy(p.frame.dest_addr, target, 8); + uint64_t target_h = NTOHLL(target->uint64); + memcpy(p.frame.dest_addr, &target_h, 8); response = net_if_transceiver_get_set_handler(if_id, SND_PKT, (void *)&p); } else {