mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-27 07:21:18 +01:00
Merge pull request #1046 from benpicco/fix_routing
fix forwarding packets when ndp_get_ll_address() returns NULL
This commit is contained in:
commit
ce33d5e2eb
@ -84,7 +84,7 @@ int ipv6_send_packet(ipv6_hdr_t *packet)
|
||||
nce->lladdr_len,
|
||||
(uint8_t *)packet,
|
||||
length) < 0) {
|
||||
/* XXX: this is wrong, but until ND does not work correctly,
|
||||
/* XXX: this is wrong, but until ND does work correctly,
|
||||
* this is the only way (aka the old way)*/
|
||||
uint16_t raddr = NTOHS(packet->destaddr.uint16[7]);
|
||||
sixlowpan_lowpan_sendto(0, &raddr, 2, (uint8_t *)packet, length);
|
||||
@ -117,7 +117,7 @@ int ipv6_send_packet(ipv6_hdr_t *packet)
|
||||
if (nce == NULL || sixlowpan_lowpan_sendto(nce->if_id, &nce->lladdr,
|
||||
nce->lladdr_len,
|
||||
(uint8_t *)packet, length) < 0) {
|
||||
/* XXX: this is wrong, but until ND does not work correctly,
|
||||
/* XXX: this is wrong, but until ND does work correctly,
|
||||
* this is the only way (aka the old way)*/
|
||||
uint16_t raddr = dest->uint16[7];
|
||||
sixlowpan_lowpan_sendto(0, &raddr, 2, (uint8_t *)packet, length);
|
||||
@ -438,6 +438,11 @@ void ipv6_process(void)
|
||||
nce->lladdr_len,
|
||||
(uint8_t *)ipv6_get_buf_send(),
|
||||
packet_length);
|
||||
} else {
|
||||
/* XXX: this is wrong, but until ND does work correctly,
|
||||
* this is the only way (aka the old way)*/
|
||||
uint16_t raddr = dest->uint16[7];
|
||||
sixlowpan_lowpan_sendto(0, &raddr, 2, (uint8_t *)ipv6_get_buf_send(), packet_length);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user