Re: PATCH: duplicate IP detection

Marc Merlin (marc_news@merlins.org)
Fri, 15 Oct 1999 03:12:44 -0700


On jeu, oct 14, 1999 at 05:12:16 +0400, kuznet@ms2.inr.ac.ru wrote:
> Hello!
>
> > Attached is a patch to passively detect duplicate IP conflicts. I sent it to
> > l-k two weeks ago and got feedback from Rogier Wolff who seemed to like it.
>
> Duplicate address detection does not work in this way.

It looks like that's how some other OSes do it. Note that we are talking
about passive detection here.
As Rogier explained, we had a discussion here and he expressed reservations
wrt sending packets for detecting duplicate IPs, and on my side, I realized
that what I wanted to do could create a loop.

> Correct way is described f.e. in RFC-2131.

I've looked at it when I saw the comment in the code (probably yours)
/* Special case: IPv4 duplicate address detection packet (RFC2131) */

> Shortly: ARP packets with your IP source are legal and common phenomenon.

Would you maintain that statement if I check that the source MAC address is
different from mine?
In other words, is there any good reason for an ARP packet with my IP
address as the source, and a source MAC address that is different from mine
to exist (without it being a conflict that the kernel should whine about)?

> Even more: on switched networks you get you own packets back
> in several exemplars frequently.

I wouldn't quite say frequently, but you're right, it is very possible for
network equipment to send some datagram a second time.

Would you agree with my patch once I add a check to make sure the source
hardware address is different from mine?

I'm also considering checking if the source MAC address is the same than
mine, but the source IP is different from all the IPs my MAC has. I've seen
indies at SGI that came back from the shop, and had identical MAC addresses.

Would you have a problem with such a patch?

If not, I'll update my current patch to add your suggestion, and add the
duplicate MAC address check after getting a few hours of sleep :-)

Best,
Marc

-- 
Microsoft is to software what McDonalds is to gourmet cooking
 
Home page: http://marc.merlins.org/ (friendly to non IE browsers)
Finger marc_f@merlins.org for PGP key and other contact information

- 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/