Re: notion of a local address [was: Re: ioctl SIOCGIFNETMASK: ip

Alex Bligh - linux-kernel (linux-kernel@alex.org.uk)
Thu, 06 Sep 2001 18:05:30 +0100


Andrey,

--On Thursday, September 06, 2001 8:38 PM +0400 Andrey Savochkin
<saw@saw.sw.com.sg> wrote:

> Hell, how else could you define the notion of a local address as not the
> address which responds to pings without external network, the address for
> which

So the remote end of a looped /30 serial line is now a local address?
Can you bind() to 127.0.0.2? In any case, all you've found is a
peculiarity of the loopback driver. So send a patch.

The read RFC1122. (hosts & routers requirements).
Not only does this define local address, but specifically writes:

3.3.4.2 Multihoming Requirements

The following general rules apply to the selection of an IP
source address for sending a datagram from a multihomed
host.

(1) If the datagram is sent in response to a received
datagram, the source address for the response SHOULD be
the specific-destination address of the request. See
Sections 4.1.3.5 and 4.2.3.7 and the "General Issues"
section of [INTRO:1] for more specific requirements on
higher layers.

Otherwise, a source address must be selected.

(2) An application MUST be able to explicitly specify the
source address for initiating a connection or a
request.

How can (2) be usefully true if the application cannot determine
what the list of valid local addresses are? Or is your argument
that all such addresses should be configured manually, rather
than by the application? Which would not only be a rather
odd point of view, but makes implementing things like
BGP, which depends on being able to get the outbound interface
address used for a session up to the higher layers, rather hard.

--
Alex Bligh
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/