From owner-svn-src-all@freebsd.org Thu Apr 21 16:04:59 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 882FCB14EF3; Thu, 21 Apr 2016 16:04:59 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 58FEB1796; Thu, 21 Apr 2016 16:04:59 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u3LG4wjX035875; Thu, 21 Apr 2016 16:04:58 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u3LG4wmT035874; Thu, 21 Apr 2016 16:04:58 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201604211604.u3LG4wmT035874@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 21 Apr 2016 16:04:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r298412 - head/sys/ofed/drivers/infiniband/core X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Apr 2016 16:04:59 -0000 Author: hselasky Date: Thu Apr 21 16:04:58 2016 New Revision: 298412 URL: https://svnweb.freebsd.org/changeset/base/298412 Log: 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 Modified: head/sys/ofed/drivers/infiniband/core/addr.c Modified: head/sys/ofed/drivers/infiniband/core/addr.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/addr.c Thu Apr 21 15:38:28 2016 (r298411) +++ head/sys/ofed/drivers/infiniband/core/addr.c Thu Apr 21 16:04:58 2016 (r298412) @@ -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) {