From 143b6560dae255fa68d35e2cd08b88ff69070e4e Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Thu, 24 Apr 2014 05:36:18 +0200 Subject: [PATCH] net/ip: apply workaround to fix IP forwarding When sending a packet a workaround is applied when ndp_get_ll_address() returns NULL as is's not implemented properly yet. The same should happen when a packet is forwarded as it's dropped otherwise. --- sys/net/network_layer/sixlowpan/ip.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/net/network_layer/sixlowpan/ip.c b/sys/net/network_layer/sixlowpan/ip.c index db76a4fb05..0daf4fed8e 100644 --- a/sys/net/network_layer/sixlowpan/ip.c +++ b/sys/net/network_layer/sixlowpan/ip.c @@ -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 not 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); } }