RDMA/nes: Fix for resolving the neigh

Neighbor resolution doesn't work without this fix

Signed-off-by: Tatyana Nikolova <Tatyana.E.Nikolova@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
Tatyana Nikolova 2015-07-02 12:49:40 -05:00 committed by Doug Ledford
parent a7f2f24cd7
commit 165d682289
1 changed files with 3 additions and 2 deletions

View File

@ -1520,8 +1520,9 @@ static int nes_addr_resolve_neigh(struct nes_vnic *nesvnic, u32 dst_ip, int arpi
int rc = arpindex; int rc = arpindex;
struct net_device *netdev; struct net_device *netdev;
struct nes_adapter *nesadapter = nesvnic->nesdev->nesadapter; struct nes_adapter *nesadapter = nesvnic->nesdev->nesadapter;
__be32 dst_ipaddr = htonl(dst_ip);
rt = ip_route_output(&init_net, htonl(dst_ip), 0, 0, 0); rt = ip_route_output(&init_net, dst_ipaddr, nesvnic->local_ipaddr, 0, 0);
if (IS_ERR(rt)) { if (IS_ERR(rt)) {
printk(KERN_ERR "%s: ip_route_output_key failed for 0x%08X\n", printk(KERN_ERR "%s: ip_route_output_key failed for 0x%08X\n",
__func__, dst_ip); __func__, dst_ip);
@ -1533,7 +1534,7 @@ static int nes_addr_resolve_neigh(struct nes_vnic *nesvnic, u32 dst_ip, int arpi
else else
netdev = nesvnic->netdev; netdev = nesvnic->netdev;
neigh = neigh_lookup(&arp_tbl, &rt->rt_gateway, netdev); neigh = dst_neigh_lookup(&rt->dst, &dst_ipaddr);
rcu_read_lock(); rcu_read_lock();
if (neigh) { if (neigh) {