From owner-svn-src-all@freebsd.org Thu Apr 21 17:12:25 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 27A4FB173AA; Thu, 21 Apr 2016 17:12:25 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-lb0-x235.google.com (mail-lb0-x235.google.com [IPv6:2a00:1450:4010:c04::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A4FE61D7F; Thu, 21 Apr 2016 17:12:24 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-lb0-x235.google.com with SMTP id os9so30664061lbb.2; Thu, 21 Apr 2016 10:12:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=fMxVspsjiLUrGolJ/7Rke1ubGzlvDnFb7n9sfEHL0II=; b=tOu0iHzCdEFyZP2wWha7nWE/vPQatF6sgac8uxSa1GO2MjMUd/wpZ63jYVJZCZzfmQ VdVGWgg+F2jpU2/4RAEygMXcgOLwnCRmLyIW51Z+m8wwH3075/lu9cJTi1IQcwhGHPNk uMmb2ojNeywjL7PqGQfc9YXoBnZBjOgqzFgNwX1i3xkk461+M3+ForZohHIqmGVg27Q/ CAlmB3tI+lTkR6uZjefcx05klLH8Wa4EZrpTOPIgYK5U9ObSF7oDZL6b/vsFevS6wl1c /j6pc+INC02CYqZfTxzGMPSj/RE97X4BKh+xBGpizspIsQK6vWK4rHb9Qb9WoRAYUgeD R+eQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=fMxVspsjiLUrGolJ/7Rke1ubGzlvDnFb7n9sfEHL0II=; b=T/7uAJivySxDTIDxg83DSIxfvcpiHttV8BULrukBE5ZKFvTO5ga8uSeruOz+cC5hDi qqX5B6FR3s9D6nGsWC4sOhZQ6ml1n8bNl8GkEEi3PDLmAtXX1XIcE9TpBCXEuDcyj87l McVwylzHJKcE9hE31VhOLnjGPLcuEkgujgW3L4aB/47feOVnwT8zCQfb0ZCbdtsSUvxW qCDprjozkrE5bp3OPTEtKtiguyn11PWiIVTuCOfUNiSBJevvRj2SrgPBb1uJs3rXLyw6 v4sVH7z6TTogmlFh6a6r+g/pryUAB21s8ScwGcBnOJU0BHr3uot9vXm/I10n1qlLvHYe t/jg== X-Gm-Message-State: AOPr4FUiC1P1nIZsembGUIcOhV0sVSq3fSORrvB9fBmZv54XHNPGn7JBobFx3TYrEf3x4SFQY/lhBqQvSKdE1Q== MIME-Version: 1.0 X-Received: by 10.112.205.69 with SMTP id le5mr410755lbc.138.1461258741834; Thu, 21 Apr 2016 10:12:21 -0700 (PDT) Received: by 10.112.236.33 with HTTP; Thu, 21 Apr 2016 10:12:21 -0700 (PDT) In-Reply-To: <201604211604.u3LG4wmT035874@repo.freebsd.org> References: <201604211604.u3LG4wmT035874@repo.freebsd.org> Date: Thu, 21 Apr 2016 10:12:21 -0700 Message-ID: Subject: Re: svn commit: r298412 - head/sys/ofed/drivers/infiniband/core From: Ngie Cooper To: Hans Petter Selasky Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 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 17:12:25 -0000 On Thu, Apr 21, 2016 at 9:04 AM, Hans Petter Selasky wrote: > 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) { Please put the "deadcode" back. It will crash now if it's given an invalid address family (or none are configured in the kernel) when it tries to do the memcpy below.