summaryrefslogtreecommitdiffstats
path: root/sys/ofed/drivers/infiniband
diff options
context:
space:
mode:
authorhselasky <hselasky@FreeBSD.org>2016-04-21 16:04:58 +0000
committerhselasky <hselasky@FreeBSD.org>2016-04-21 16:04:58 +0000
commit4442b8fd7d27ab1c261192511b022acf0fdc541d (patch)
treee80d5c26c736bc6d2fec4fc1b0f141a2fd8bc25f /sys/ofed/drivers/infiniband
parentfc65edc1cd05de15ef17e14dc54c2bf6c41ccab8 (diff)
downloadFreeBSD-src-4442b8fd7d27ab1c261192511b022acf0fdc541d.zip
FreeBSD-src-4442b8fd7d27ab1c261192511b022acf0fdc541d.tar.gz
Fix for resolving mac address when the destination address is a gateway.
Remove some dead code while at it. Sponsored by: Mellanox Technologies MFC after: 1 week
Diffstat (limited to 'sys/ofed/drivers/infiniband')
-rw-r--r--sys/ofed/drivers/infiniband/core/addr.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/ofed/drivers/infiniband/core/addr.c b/sys/ofed/drivers/infiniband/core/addr.c
index 27ad05e..7992bae 100644
--- a/sys/ofed/drivers/infiniband/core/addr.c
+++ b/sys/ofed/drivers/infiniband/core/addr.c
@@ -333,17 +333,18 @@ mcast:
switch (dst_in->sa_family) {
#ifdef INET
case AF_INET:
- error = arpresolve(ifp, is_gw, NULL, dst_in, edst, NULL);
+ error = arpresolve(ifp, is_gw, NULL,
+ is_gw ? rte->rt_gateway : dst_in, edst, NULL);
break;
#endif
#ifdef INET6
case AF_INET6:
- error = nd6_resolve(ifp, is_gw, NULL, dst_in, edst, NULL);
+ error = nd6_resolve(ifp, is_gw, NULL,
+ is_gw ? rte->rt_gateway : dst_in, edst, NULL);
break;
#endif
default:
- /* XXX: Shouldn't happen. */
- error = -EINVAL;
+ break;
}
RTFREE(rte);
if (error == 0) {
OpenPOWER on IntegriCloud