| To: | Henrik Nordstrom <hno@xxxxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH] Change masquerade code to use first IP address of interface. |
| From: | Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> |
| Date: | Wed, 20 Oct 2004 20:46:50 +1000 |
| Cc: | Rusty Russell <rusty@xxxxxxxxxxxxxxx>, netdev@xxxxxxxxxxx, netfilter-devel@xxxxxxxxxxxxxxxxxxx |
| In-reply-to: | <Pine.LNX.4.61.0410201123200.25590@xxxxxxxxxxxxxxxxxxxxx> |
| References: | <E1CKBtq-0005FC-00@xxxxxxxxxxxxxxxxxxxxxxxx> <Pine.LNX.4.61.0410201123200.25590@xxxxxxxxxxxxxxxxxxxxx> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
| User-agent: | Mutt/1.5.6+20040722i |
On Wed, Oct 20, 2004 at 11:24:17AM +0200, Henrik Nordstrom wrote:
> 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?
I mean
rt = (struct rtable *)(*pskb)->dst;
newsrc = inet_select_addr(out, rt->rt_gateway, RT_SCOPE_UNIVERSE);
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> |
|---|---|---|
| ||
| Previous by Date: | Re: iproute2 and 2.6.9 kernel headers (was Re: [ANNOUNCE] iproute2 2.6.9-041019), David Woodhouse |
|---|---|
| Next by Date: | Re: [PATCH] Change masquerade code to use first IP address of interface., Henrik Nordstrom |
| Previous by Thread: | Re: [PATCH] Change masquerade code to use first IP address of interface., Henrik Nordstrom |
| Next by Thread: | Re: [PATCH] Change masquerade code to use first IP address of interface., Henrik Nordstrom |
| Indexes: | [Date] [Thread] [Top] [All Lists] |