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

Andi Kleen (ak@suse.de)
Thu, 6 Sep 2001 18:47:42 +0200


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.

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