diff options
-rw-r--r-- | drivers/infiniband/hw/nes/nes_cm.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c index 0997c7b8cd9b..f241ca104d16 100644 --- a/drivers/infiniband/hw/nes/nes_cm.c +++ b/drivers/infiniband/hw/nes/nes_cm.c | |||
@@ -1142,7 +1142,10 @@ static struct nes_cm_node *make_cm_node(struct nes_cm_core *cm_core, | |||
1142 | 1142 | ||
1143 | cm_node->loopbackpartner = NULL; | 1143 | cm_node->loopbackpartner = NULL; |
1144 | /* get the mac addr for the remote node */ | 1144 | /* get the mac addr for the remote node */ |
1145 | arpindex = nes_arp_table(nesdev, cm_node->rem_addr, NULL, NES_ARP_RESOLVE); | 1145 | if (ipv4_is_loopback(htonl(cm_node->rem_addr))) |
1146 | arpindex = nes_arp_table(nesdev, ntohl(nesvnic->local_ipaddr), NULL, NES_ARP_RESOLVE); | ||
1147 | else | ||
1148 | arpindex = nes_arp_table(nesdev, cm_node->rem_addr, NULL, NES_ARP_RESOLVE); | ||
1146 | if (arpindex < 0) { | 1149 | if (arpindex < 0) { |
1147 | arpindex = nes_addr_resolve_neigh(nesvnic, cm_info->rem_addr); | 1150 | arpindex = nes_addr_resolve_neigh(nesvnic, cm_info->rem_addr); |
1148 | if (arpindex < 0) { | 1151 | if (arpindex < 0) { |