From: Herbert Xu <herbert@gondor.apana.org.au>
To: Henrik Nordstrom <hno@marasystems.com>
Cc: netdev@oss.sgi.com, Rusty Russell <rusty@rustcorp.com.au>,
netfilter-devel@lists.netfilter.org
Subject: Re: [PATCH] Change masquerade code to use first IP address of interface.
Date: Wed, 20 Oct 2004 21:12:45 +1000 [thread overview]
Message-ID: <20041020111245.GA22703@gondor.apana.org.au> (raw)
In-Reply-To: <Pine.LNX.4.61.0410201300580.28452@filer.marasystems.com>
On Wed, Oct 20, 2004 at 01:04:51PM +0200, Henrik Nordstrom wrote:
> On Wed, 20 Oct 2004, Herbert Xu wrote:
>
> >I mean
> >
> > rt = (struct rtable *)(*pskb)->dst;
> > newsrc = inet_select_addr(out, rt->rt_gateway, RT_SCOPE_UNIVERSE);
>
> IIRC we are not allowed to access this here, but I may be wrong.. If we
Why? POST_ROUTING is called in three places in ip_output.c and they all
give a valid dst. In fact ip_refrag in ip_conntrack_standalone.c is also
accessing skb->dst.
> are allowe to access the rtable like this then this is obviously better,
> and should also solve most policy routing setups (and allow the others to
> be solved).
Well it isn't really equivalent to full policy routing since we've lost
the preferred source field.
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
next prev parent reply other threads:[~2004-10-20 11:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-20 2:58 [PATCH] Change masquerade code to use first IP address of interface Rusty Russell
2004-10-20 8:28 ` Herbert Xu
2004-10-20 8:32 ` Herbert Xu
2004-10-20 9:24 ` Henrik Nordstrom
2004-10-20 10:46 ` Herbert Xu
2004-10-20 11:04 ` Henrik Nordstrom
2004-10-20 11:12 ` Herbert Xu [this message]
2004-10-21 0:50 ` Rusty Russell
2004-10-21 5:29 ` David S. Miller
2004-10-20 17:42 ` Patrick McHardy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20041020111245.GA22703@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=hno@marasystems.com \
--cc=netdev@oss.sgi.com \
--cc=netfilter-devel@lists.netfilter.org \
--cc=rusty@rustcorp.com.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).