All of lore.kernel.org
 help / color / mirror / Atom feed
From: Davide <tatonet@tiscali.it>
To: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: nf_conntrack
Date: Sun, 22 Feb 2004 11:25:08 +0100	[thread overview]
Message-ID: <200402221125.08904.tatonet@tiscali.it> (raw)
In-Reply-To: <200402201258.VAA29529@toshiba.co.jp>

On Friday 20 February 2004 13:58, you wrote:
> Hi,
>
> From: Davide Guerri <tato.net@tin.it>
> Date: Fri, 20 Feb 2004 09:42:13 +0100
>
> > Hi, and sorry for my poor English.
>
> Don't worry. me too.
>
> > I'm very interested in this project since I'm writing a NA(P)T-PT (as
> > described in RFC 2766) implementation for Linux. Actually I'm a student
> > (computer science, in Rome) and this will be my PhD thesis.
>
> Great.
>
> > What happened to your code? I've downloaded USAGI Linux kernel, but I've
> > found only your previous IPv6 conntrack. (very good work however!)
>
> nf_conntrack is not in USAGI linux26. Of cause, I'll commit it to USAGI
> tree.
>
> After I sent nf_conntrack, Mr. Harald Welte, who is a member of Netfilter
> Core Team, suggested that L3 part of conntrack (tuple, too) should be
> allocated dynamically.
>
> Then I wrote "dynamic version" and sent it last year (December), but I
> suspend this work due to other work for a while. Fortunately, I could
> resume to this work. I'll evaluate 2 implementations, and decide which
> implementation is adopted.
>
> After that, I'll commit nf_conntrack to USAGI tree.

That's a great news.
I've tryed the second version of your nf_conntrack. It seems to work very 
well!

> > Is there some documentation on conntrack? I'm reading the existing NAT
> > code, but it's quite difficult to understand. It's difficult for me
> > because I don't yet completely understand the general behaviour of
> > netfilter conntrack and the role of its tricky data structures.
>
> Unfortunately, there isn't documentation about nf_conntrack.
> But its scheme is mostly same as ip_conntrack. The differences are tuple,
> new functions and arguments for Layer 3 header handling, and new module
> for Layer 3 protocols.
>
> BTW, do you read Documentations at Netfilter Project web page ?
>
> 	http://www.netfilter.org/documentation/index.html
>
> "Netfilter Hacking HOWTO" may help you.

In the (very good) "Netfilter Hacking HOWTO" there are some infos on NAT, but 
I would need more detail.
However there is no problem, I'll study the netfilter code. ;)

> > I've also downloaded the nf_conntrack patch included in your post on
> > netfilter-devel, I've applied it to a vanilla 2.6.0 Kernel and I'm going
> > to try it. Prior to read that code, I would ask you if it can handle
> > mixed IPv6-IPv4 tuples.
>
> Thank you for using nf_conntrack. But you cannot handle mixed tuples
> (ex. src = IPv6, dst = IPv4) in now.

Sorry, I've expressed myself badly! What I need is to change the expected 
reply of the conntrack from an IPv4 tuple to an IPv6 tuple and vice versa. 
Hence what I would to know is if nf_conntrack can handles original-direction 
tuples of one type and reply-direction tuple of the other type (so that it 
will be possible to track a "NA(P)T-PT'ed connection").

> 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).

> BTW, if allowed, could you Cc to netfilter-devel for other folks who
> interested in this area ?

I've just done it ;)

> Regards,
>
> -----------------------------------------------------------------
> Yasuyuki KOZAKAI @ USAGI Project <yasuyuki.kozakai@toshiba.co.jp>

Thank you very much Yasuyuki for your work and for your quick reply!

Best regards,
Davide Guerri.

-- 
T@1t

  parent reply	other threads:[~2004-02-22 10:25 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       ` nf_conntrack Davide
2004-03-01  6:08         ` nf_conntrack Yasuyuki Kozakai
2004-03-01 11:08           ` nf_conntrack Davide Guerri
2004-02-22 10:25   ` Davide [this message]
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=200402221125.08904.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.