The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Edward Srouji <edwards@nvidia.com>
Cc: Leon Romanovsky <leon@kernel.org>,
	Parav Pandit <parav@nvidia.com>,
	Vlad Dumitrescu <vdumitrescu@nvidia.com>,
	linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
	Maher Sanalla <msanalla@nvidia.com>,
	stable@vger.kernel.org
Subject: Re: [PATCH rdma-next] RDMA/core: Fix broadcast address falsely detected as local
Date: Wed, 10 Jun 2026 15:03:32 -0300	[thread overview]
Message-ID: <20260610180332.GA1017469@nvidia.com> (raw)
In-Reply-To: <20260609-fix-rdma-resolve-addr-v1-1-449b8b4e6c09@nvidia.com>

On Tue, Jun 09, 2026 at 02:16:38PM +0300, Edward Srouji wrote:
> From: Maher Sanalla <msanalla@nvidia.com>
> 
> When rdma_resolve_addr() is invoked with a broadcast destination on an
> IPoIB interface, is_dst_local() inspects the resolved route and
> incorrectly concludes that the address is local. As a result, the
> resolution fails with -ENODEV.
> The issue stems from using '&' to compare rt_type with RTN_LOCAL. The
> RTN_* values form a sequential enum, not a bitmask (RTN_LOCAL=2,
> RTN_BROADCAST=3). Thus, "rt_type & RTN_LOCAL" yields a non-zero result
> for a broadcast route as well.
> 
> Replace '&' with '==' when comparing rt_type against RTN_LOCAL.
> 
> Cc: stable@vger.kernel.org
> Fixes: c31e4038c97f ("RDMA/core: Use route entry flag to decide on loopback traffic")
> Signed-off-by: Maher Sanalla <msanalla@nvidia.com>
> Reviewed-by: Vlad Dumitrescu <vdumitrescu@nvidia.com>
> Signed-off-by: Edward Srouji <edwards@nvidia.com>
> Reviewed-by: Parav Pandit <parav@nvidia.com>
> ---
>  drivers/infiniband/core/addr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to for-next

Thanks,
Jason

      parent reply	other threads:[~2026-06-10 18:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-09 11:16 [PATCH rdma-next] RDMA/core: Fix broadcast address falsely detected as local Edward Srouji
2026-06-09 12:48 ` Parav Pandit
2026-06-10 18:03 ` Jason Gunthorpe [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260610180332.GA1017469@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=edwards@nvidia.com \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=msanalla@nvidia.com \
    --cc=parav@nvidia.com \
    --cc=stable@vger.kernel.org \
    --cc=vdumitrescu@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox