Re: ARP: arp called for own IP address

really kuznet@ms2.inr.ac.ru (inr-linux-kernel@ms2.inr.ac.ru)
12 Apr 1996 17:07:49 +0400


Linus Torvalds (torvalds@cs.Helsinki.FI) wrote:

: Note that the RFC1812 requirement by no means requires us to complicate
: the routing code: we should instead add the routes to devices
: automatically when creating the devices with ifconfig. That would
: actually clean up the routing code somewhat: right now the IP routing
: looks at the device address as a special case, even though it would be
: cleaner to have a special _entry_ for that address.

Agree! Really, we should make it.
I'm afraid it will confuse gated, I'll check it tonight.

But note, that RFC1812 requires more strong thing:
it requires to check directly connected interfaces
(not only host's own address) before checking routing table.
It is the thing that I consider unacceptable.

: For example, the device 1.1.1.1 with netmask 255.255.255.0 should really
: be thought of as two separate routes:

: 1.1.1.1 (255.255.255.255) - loopback
: 1.1.0.0 (255.255.0.0) - device

: and if we did those as two separate entries it would clean some things
: up. If we also sort the routing tables appropriately (ie force these
: kinds of device routes first), we essentially get the rfc requirements,
: with no ugly code.

No special efforts needed, these routes will be sorted automatically.
The only change in the code: on UP event call rt_add, on down rt_del.
That's all!

Alexey Kuznetsov.