Messages in this thread | | | From | Brian Moyle <> | Subject | FW: [PATCH] linux/net/ipv4/arp.c, kernel 2.0.36 | Date | Fri, 29 Jan 1999 12:11:48 -0800 |
| |
> Description: Fixes problem with external loopback, using crossed route > entries. > Version: 2.0.36 > 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 to both addreseses. Unplugged cable to > verify > pings were appropriately halted. > Request: Please CC bmoyle@redcreek.com with any comments/feedback. > Thanks! > > -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/
| |