From mboxrd@z Thu Jan 1 00:00:00 1970 From: Henrik Nordstrom Subject: Re: [PATCH] Change masquerade code to use first IP address of interface. Date: Wed, 20 Oct 2004 11:24:17 +0200 (CEST) Sender: netfilter-devel-bounces@lists.netfilter.org Message-ID: References: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: netdev@oss.sgi.com, Rusty Russell , netfilter-devel@lists.netfilter.org Return-path: To: Herbert Xu In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: netfilter-devel-bounces@lists.netfilter.org List-Id: netdev.vger.kernel.org On Wed, 20 Oct 2004, Herbert Xu wrote: > Rusty Russell 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