summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorMaher Sanalla <msanalla@nvidia.com>2026-06-09 14:16:38 +0300
committerJason Gunthorpe <jgg@nvidia.com>2026-06-10 20:45:43 +0300
commit942cd47faa2047b46dfd85745603eba9006973e6 (patch)
tree9d58d4392ed543b06d6a63fb8fb28d671c27c5e6 /include/linux
parent2cde8282ff6e28c5e2fa3dbed25f154bd0e1cd7f (diff)
downloadlinux-942cd47faa2047b46dfd85745603eba9006973e6.tar.xz
RDMA/core: Fix broadcast address falsely detected as local
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. Link: https://patch.msgid.link/r/20260609-fix-rdma-resolve-addr-v1-1-449b8b4e6c09@nvidia.com 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> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions