Messages in this thread | | | Date | Wed, 27 Oct 1999 13:36:53 +0200 | From | Andi Kleen <> | Subject | Re: PATCH: duplicate IP detection (new version) |
| |
On Wed, Oct 27, 1999 at 11:25:57AM +0200, Marc Merlin wrote: > + else if (arp->ar_op == __constant_htons(ARPOP_REQUEST)) { > + struct in_device *idev=dev->ip_ptr; > + struct in_ifaddr *adlist=idev->ifa_list; > + > + while (adlist != NULL) > + { > + if (adlist->ifa_address == sip) { > + > + if (net_ratelimit()) > + printk (KERN_WARNING "Uh Oh, MAC address %s claims to have our IP addresses (%s) (duplicate IP conflict likely)\n", mac2asc(sha,dev->addr_len), in_ntoa(sip)); > + break; > + } > + adlist=adlist->ifa_next; > + } > + }
fib_validate_source called from the ip_route_input below computes that information anyways. It would be better to put that check there, no cycles wasted in the fast path. Only checking the local device's list is broken anyways.
-Andi
- 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/
| |