ethip6: forward correct error code
On failure, nd6_get_next_hop_entry() returns an ERR_ type negative
error code. ethip6_output() erroneously assumed that that error would
always be ERR_MEM, even though it may also be ERR_RTE in practice.
With this patch, ethip6_output() simply forwards the returned error.
diff --git a/src/core/ipv6/ethip6.c b/src/core/ipv6/ethip6.c
index b9bbcce..0730426 100644
--- a/src/core/ipv6/ethip6.c
+++ b/src/core/ipv6/ethip6.c
@@ -113,7 +113,7 @@
i = nd6_get_next_hop_entry(ip6addr, netif);
if (i < 0) {
/* failed to get a next hop neighbor record. */
- return ERR_MEM;
+ return i;
}
/* Now that we have a destination record, send or queue the packet. */