lkml.org 
[lkml]   [2001]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectnotion of a local address [was: Re: ioctl SIOCGIFNETMASK: ip alias bug 2.4.9 and 2.2.19]
On Thu, Sep 06, 2001 at 04:21:24PM +0200, Matthias Andree wrote:
> On Thu, 06 Sep 2001, Wietse Venema wrote:
>
> > If Linux insists on breaking SIOCGIFCONF then so be it, even though
> > it works perfectly well on any non-Linux system that I could lay
> > my hands on.
>
> Linux does not break SIOCGIFCONF as far as I can see, but
> SIOCGIFNETMASK. Your inet_addr_local obtains all interfaces's addresses,
> it just gets the wrong netmasks back.

Of course, SIOCGIFCONF isn't even close to provide the list of local
addresses.
Obvious example: it doesn't enlist all addresses 127.0.0.1, 127.0.0.2 etc.
on common systems. If you handle 127.0.0.2 as local, you apply side
knowledge about properties of loopback interface.
Less obvious example: routes added to `local' table.
SIOCGIFCONF can never show them.

On Thu, Sep 06, 2001 at 04:17:49PM +0200, Matthias Andree wrote:
> I'm not sure where and why you deduce the idea this is about MTA loop
> detection or peer recognition.

Because it's the obvious reason to start to be aware about networking
configuration, and all MTAs known to me try to do it.

All other reasons are absolutely artificial.
You just complicate things without a good reason by linking policies in
different areas.
If I prefer to use wider network mask than it should be and use proxy arp
service of some of my neighbours, why should it affect SMTP?
Or, vice versa, if I use narrower mask and want to use IP gateway for
directly reachable IPs?
You don't look for .htaccess files to get the idea what other IPs have
special meaning for administrators/users of the system, right?

[snip]
> > So, the very right way of doing things is:
> > - make admin specify the listening addresses for a mail system in the
> > configuration and use them to check for loops;
>
> Or just use IPADDR_ANY...

If the mailer's socket is bound to IPADDR_ANY, it's hard to find which
connection attempts will be handled locally, so the best way to handle it is
to ask the admin.
I personally do not use IPADDR_ANY, use of explicit IP addresses makes things
a lot simpler.

> > - never try to learn anything about networking configuration.
>
> ...which is wrong, because the MTA must know its own IP addresses to
> accept domain literals, and SIOCGIFCONF works and returns all addresses,
> it just happens that looking up the second and subsequent masks fails.
> Please see RFC-1123, section 5.2.17, for details.

The language of that section is amazing:
An SMTP MUST accept and recognize a domain literal for any of
its own IP addresses.
What might be ``own IP addresses'' of ``an SMTP''?..
Does SMTP server have ``own IP addresses'' at all?
It's difficult to explain what ``own IP addresses'' of a host are, not
speaking about a server...

Are ``own IP addresses'' of ``an SMTP'' the same as ``set of IP addresses,
for which packets coming from interface eth0, for example, and destined to
port 25 on them are handled locally according to the routing policy set for
the system where SMTP server is running''?
Hmm, these 2 notions don't look identical...

Hey, may be its ``own IP addresses'' are just what is specified in the
configuration file as ``own IP addresses''?
That looks like the real answer.

Best regards
Andrey
-
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/

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