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.
This commit is contained in:
David van Moolenbroek 2016-12-13 18:23:28 +00:00 committed by goldsimon
parent 9d199a6d72
commit 002e077dbd

View File

@ -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); i = nd6_get_next_hop_entry(ip6addr, netif);
if (i < 0) { if (i < 0) {
/* failed to get a next hop neighbor record. */ /* 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. */ /* Now that we have a destination record, send or queue the packet. */