Skip to content

Commit 200651b

Browse files
paravmellanoxrleon
authored andcommitted
RDMA/core: Resolve MAC of next-hop device without ARP support
Currently, if the next-hop netdevice does not support ARP resolution, the destination MAC address is silently set to zero without reporting an error. This leads to incorrect behavior and may result in packet transmission failures. Fix this by deferring MAC resolution to the IP stack via neighbour lookup, allowing proper resolution or error reporting as appropriate. Fixes: 7025fcd ("IB: address translation to map IP toIB addresses (GIDs)") Signed-off-by: Parav Pandit <parav@nvidia.com> Reviewed-by: Vlad Dumitrescu <vdumitrescu@nvidia.com> Signed-off-by: Edward Srouji <edwards@nvidia.com> Link: https://patch.msgid.link/20250916111103.84069-3-edwards@nvidia.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
1 parent fa29d1e commit 200651b

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

drivers/infiniband/core/addr.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -454,14 +454,10 @@ static int addr_resolve_neigh(const struct dst_entry *dst,
454454
{
455455
int ret = 0;
456456

457-
if (ndev_flags & IFF_LOOPBACK) {
457+
if (ndev_flags & IFF_LOOPBACK)
458458
memcpy(addr->dst_dev_addr, addr->src_dev_addr, MAX_ADDR_LEN);
459-
} else {
460-
if (!(ndev_flags & IFF_NOARP)) {
461-
/* If the device doesn't do ARP internally */
462-
ret = fetch_ha(dst, addr, dst_in, seq);
463-
}
464-
}
459+
else
460+
ret = fetch_ha(dst, addr, dst_in, seq);
465461
return ret;
466462
}
467463

0 commit comments

Comments
 (0)