From 002e077dbde0274810957320d23d58554ce0ff13 Mon Sep 17 00:00:00 2001 From: David van Moolenbroek Date: Tue, 13 Dec 2016 18:23:28 +0000 Subject: [PATCH] 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. --- src/core/ipv6/ethip6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/ipv6/ethip6.c b/src/core/ipv6/ethip6.c index b9bbcce4..0730426c 100644 --- a/src/core/ipv6/ethip6.c +++ b/src/core/ipv6/ethip6.c @@ -113,7 +113,7 @@ ethip6_output(struct netif *netif, struct pbuf *q, const ip6_addr_t *ip6addr) 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. */