The following patch returns the GID of the IP gateway for non-local
subnet IP addresses.

Hal, does this change look correct to you?  I don't have an easy way
to test this fully.

Signed-off-by: Sean Hefty <[EMAIL PROTECTED]>


Index: core/addr.c
===================================================================
--- core/addr.c (revision 3707)
+++ core/addr.c (working copy)
@@ -121,8 +121,8 @@ static void addr_send_arp(struct sockadd
        if (ip_route_output_key(&rt, &fl))
                return;
 
-       arp_send(ARPOP_REQUEST, ETH_P_ARP, dst_ip, rt->idev->dev, rt->rt_src,
-                NULL, rt->idev->dev->dev_addr, NULL);
+       arp_send(ARPOP_REQUEST, ETH_P_ARP, rt->rt_gateway, rt->idev->dev,
+                rt->rt_src, NULL, rt->idev->dev->dev_addr, NULL);
        ip_rt_put(rt);
 }
 
@@ -144,7 +144,7 @@ static int addr_resolve_remote(struct so
        if (ret)
                goto out;
 
-       neigh = neigh_lookup(&arp_tbl, &dst_ip, rt->idev->dev);
+       neigh = neigh_lookup(&arp_tbl, &rt->rt_gateway, rt->idev->dev);
        if (!neigh) {
                ret = -ENODATA;
                goto err1;



_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to