lkml.org 
[lkml]   [1999]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] linux/net/ipv4/arp.c, kernel 2.0.36 (& 2.0.37-pre9)
Description: Fixes problem with external loopback, using crossed route entries.
Version: 2.0.36 (& 2.0.37-pre9)
Testing: Connected two NICs together, using an external cross-over cable,
swapped route entries (to force packets out the opposite interfaces),
and then issued pings, telnets, & ftps to both addreseses. Unplugged
the cable to verify pings, etc. were appropriately halted.
Request: Please CC bmoyle@redcreek.com with any comments/feedback.

-Brian
bmoyle@redcreek.com

Fix to arp.c for external loopback (Brian Moyle, bmoyle@redcreek.com):
--- linux-2.0.36/net/ipv4/arp.c Sun Nov 15 10:33:21 1998
+++ linux/net/ipv4/arp.c Wed Jan 27 16:59:21 1999
@@ -20,6 +20,8 @@
* 2 of the License, or (at your option) any later version.
*
* Fixes:
+ * Brian Moyle : Fixed arp_set_predefined() to work with
+ * external loopback w/ crossed routing
* Alan Cox : Removed the ethernet assumptions in
* Florian's code
* Alan Cox : Fixed some small errors in the ARP
@@ -1287,9 +1289,15 @@
switch (addr_hint)
{
case IS_MYADDR:
+ {
+ struct device *dev_found=ip_dev_find(paddr);
printk(KERN_DEBUG "ARP: arp called for own IP address\n");
- memcpy(haddr, dev->dev_addr, dev->addr_len);
+ if (dev_found)
+ memcpy(haddr, dev_found->dev_addr, dev_found->addr_len);
+ else
+ memcpy(haddr, dev->dev_addr, dev->addr_len);
return 1;
+ }
#ifdef CONFIG_IP_MULTICAST
case IS_MULTICAST:
if(dev->type==ARPHRD_ETHER || dev->type==ARPHRD_IEEE802

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:51    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site