From: Davide <tatonet@tiscali.it>
To: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: nf_conntrack
Date: Thu, 26 Feb 2004 13:20:08 +0100 [thread overview]
Message-ID: <200402261320.08113.tatonet@tiscali.it> (raw)
In-Reply-To: <200402230527.OAA02726@toshiba.co.jp>
Hi Yasuyuki,
On Monday 23 February 2004 06:27, you wrote:
> > > You need to write NA(P)T-PT code based on nf_conntrack. Maybe IPv4 NAT
> > > codes help you. The biggest issue is how pass packets from IPv4 stack
> > > to IPv6 stack and vice versa. I imagine that addresses in packets are
> > > mangled at only NF_IP{6}_PRE_ROUNTING, and then called netif_rx().
> >
> > That was my first idea. But I've seen some code that makes use
> > ip_route_me_harder() + ip_output() for injecting IPv4 packets, and
> > ip6_route_me_harder() + ip6_output for IPv6 packets.
> > I fear that with netif_rx() traslated packet would be tracked again, and
> > this is not what I need. (I'm sorry but I'm still studying netfilter and
> > conntrack (and English too ;) ) so it's likely that I'm wrong).
>
> Sorry, I'm confusing. Which path should packets go through ? we need to
> design so that users can filter/log packets before and/or after
> translating. At least, translated packets should go through
> NF_IP{6}_FORWARD, I think.
I agree with you, users should be able to filter/log NAT(P)T-PT'ed packets.
However there are some (bad) problems.
At present time your conntrack code doesn't handle IPv6 fragments, but I guess
that when it will do, IPv6 datagrams will be defragmented as in current
conntrack. So I assume that NA(P)T-PT code will see only entire l3 packets.
One problem is that I should know if original datagrams had a fragment header
or not. NA(P)T-PT should produce IPv4 packets with DF flag set for IPv6
non-fragment datagrams and IPv4 packets with DF not set for IPv6 datagrams
with a fragment header. So, although on one hand I need conntrack, on the
other hand I should see original datagrams.
A similar problem turns out on IPv4-to-IPv6 translation. When I receive IPv4
datagrams with DF not set, I should fragment them so that their IPv6
translation fits in 1280 octects. If DF flag is set, in order to allow
pathMTU discovery, I should preserve their size and I should translate them
into IPv6 datagram without a fragmentation header (except for IPv4 fragments
with DF set...).
I'm trying to say (with my terrible English) that a NA(P)T-PT implementation
should have more control over IPv6/IPv4 packets: since conntrack
defragments/fragments them it's impossible to be RFC 2766 compliant.
For these reasons I'm tempted to use the approach proposed by Henrik (virtual
network device).
Please correct me if I've made any mistakes.
BTW: I'm very happy that your conntrack will be put into patch-o-matic-ng ;)
Best regards,
Davide
--
T@1t
next prev parent reply other threads:[~2004-02-26 12:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200402200942.13265.tato.net@tin.it>
[not found] ` <200402201258.VAA29529@toshiba.co.jp>
2004-02-22 10:10 ` nf_conntrack Davide Guerri
2004-02-23 5:27 ` nf_conntrack Yasuyuki Kozakai
2004-02-23 7:48 ` nf_conntrack Henrik Nordstrom
2004-02-26 12:20 ` Davide [this message]
2004-03-01 6:08 ` nf_conntrack Yasuyuki Kozakai
2004-03-01 11:08 ` nf_conntrack Davide Guerri
2004-02-22 10:25 ` nf_conntrack Davide
2005-01-10 20:31 nf_conntrack [was Re: [PATCH 1/4] RFC: fast string matching infrastrure for netfilter] Patrick McHardy
2005-01-10 21:28 ` Harald Welte
2005-01-14 2:45 ` Patrick McHardy
2005-01-14 4:31 ` nf_conntrack Yasuyuki KOZAKAI
-- strict thread matches above, loose matches on Subject: below --
2003-12-24 1:43 nf_conntrack Yasuyuki Kozakai
2004-02-24 9:21 ` nf_conntrack Harald Welte
2004-02-25 12:47 ` nf_conntrack Yasuyuki Kozakai
2004-02-25 15:05 ` nf_conntrack Harald Welte
2004-03-02 2:26 ` nf_conntrack Yasuyuki Kozakai
2004-03-01 11:47 ` nf_conntrack Jozsef Kadlecsik
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=200402261320.08113.tatonet@tiscali.it \
--to=tatonet@tiscali.it \
--cc=netfilter-devel@lists.netfilter.org \
--cc=yasuyuki.kozakai@toshiba.co.jp \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.