lkml.org 
[lkml]   [1999]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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/

\
 
 \ /
  Last update: 2005-03-22 13:54    [W:0.058 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site