Re: notion of a local address [was: Re: ioctl SIOCGIFNETMASK: ip alias bug 2.4.9 and 2.2.19]

Andrey Savochkin (saw@saw.sw.com.sg)
Thu, 6 Sep 2001 21:04:31 +0400


On Thu, Sep 06, 2001 at 06:47:42PM +0200, Andi Kleen wrote:
> On Thu, Sep 06, 2001 at 08:44:23PM +0400, Andrey Savochkin wrote:
> > The question was which ip.address in user@[ip.address] should be treated as
> > local.
> > My comment was that the only reasonable solution on Linux is to treat this
> > way addresses explicitly specified in the configuration file.
> > Postfix may show its guess at the installation time.
> >
> > Now the question of recognizing user@[ip.address] as local is a question of a
> > simple table lookup.
>
> It would be at least possible to ask the routing engine via RTM_GETROUTE
> and checking for RTN_LOCAL if it considers an address local.
> It won't cover all cases with netfilter rules etc.; but probably be a good
> enough approximation.

Well, you need to enlist local addresses, not to verify, so I would suggest
inspecting `local' routing table.

But it doesn't help with the other example I provided a couple of messages
earlier: several MTAs on one system listening on their own IP addresses.
Some time ago, when I was engaged in system administration activity, almost
all my mail relays had several MTAs, each in its own chroot environments...

So, using routing in the post-install script to provide suggestion what
should be written in the configuration file is very reasonable, probably,
it's the best guess that the script can make.

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/