netdev
[Top] [All Lists]

Re: [PATCH] Change masquerade code to use first IP address of interface.

To: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [PATCH] Change masquerade code to use first IP address of interface.
From: Henrik Nordstrom <hno@xxxxxxxxxxxxxxx>
Date: Wed, 20 Oct 2004 11:24:17 +0200 (CEST)
Cc: Rusty Russell <rusty@xxxxxxxxxxxxxxx>, netdev@xxxxxxxxxxx, netfilter-devel@xxxxxxxxxxxxxxxxxxx
In-reply-to: <E1CKBtq-0005FC-00@xxxxxxxxxxxxxxxxxxxxxxxx>
References: <E1CKBtq-0005FC-00@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
On Wed, 20 Oct 2004, Herbert Xu wrote:

Rusty Russell <rusty@xxxxxxxxxxxxxxx> wrote:

+       newsrc = inet_select_addr(out, 0, RT_SCOPE_UNIVERSE);
+       if (!newsrc) {
+               printk("MASQUERADE: %s ate my IP address\n", out->name);
+               return NF_DROP;

Wouldn't it be better to select the address for the gateway that we're
sending towards?

What you mean?

It would surely not be sane to masquerade as the gateway we are sending towards.

Regards
Henrik

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