netdev
[Top] [All Lists]

Re: [RFC] MASQUERADE / policy routing ("Route send us somewhere else")

To: "David S. Miller" <davem@xxxxxxxxxxxxx>
Subject: Re: [RFC] MASQUERADE / policy routing ("Route send us somewhere else")
From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 31 Aug 2004 17:00:43 +1000
Cc: laforge@xxxxxxxxxxxxx, netfilter-devel@xxxxxxxxxxxxxxxxxxx, rusty@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxx, kuznet@xxxxxxxxxxxxx
In-reply-to: <20040831064337.GA32614@xxxxxxxxxxxxxxxxxxx>
References: <20040830191915.04d49268.davem@xxxxxxxxxxxxx> <E1C1yRs-00086x-00@xxxxxxxxxxxxxxxxxxxxxxxx> <20040830223920.1db0d5ae.davem@xxxxxxxxxxxxx> <20040831064337.GA32614@xxxxxxxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.6+20040722i
On Tue, Aug 31, 2004 at 04:43:37PM +1000, herbert wrote:
> 
> In this case I really don't see what's wrong with setting oif in
> the key.  In fact that's exactly what we want to do: Get the
> preferred source address when the localhost is going to send
> a packet to *that* device.

Here's a better idea.  Why don't we forget about the route lookup
and call inet_select_addr directly?

The only time when someone wants to use MASQUERADE over SNAT is
when the interface carries a dynamic address.  In such cases,
inet_select_addr should always return the preferred address, no?

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

<Prev in Thread] Current Thread [Next in Thread>