All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira <pablo@eurodev.net>
To: Kashyap Ashwin <Ashwin.Kashyap@thomson.net>
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: ESP spi/sequence tracking and nat
Date: Tue, 10 Aug 2004 12:24:28 +0200	[thread overview]
Message-ID: <4118A25C.5010103@eurodev.net> (raw)
In-Reply-To: <8FC831532CEE564AB88AC1D999C29DEBD9F148@prinsmail01.am.thmulti.com>

Hi,

Kashyap Ashwin wrote:

> 1. How can I figure out the direction of the packet in pkt_tuple(). 
> The idea is to store the SEQ/SPI values from the packet either into 
> tuple->src or tuple->dst. I noticed that packet() has a 
> ip_conntrack_info, but pkt_tuple() does not. I am not sure if I can 
> mess ip_conntrack in packet() instead…
>

AFAIK you can't, you know if a packet comes from the original/reply 
direction once you get the tuple from the conntrack table. Trace 
resolve_normal_ct:

1) we create a temporary tuple which will be used to match: get_tuple -> 
pkt_to_tuple
2) now, it's time to look up that tuple in the conntrack table: 
ip_conntrack_find_get

at 1) we don't know which direction the packet came from, we know it at 2).

Please correct me if I'm missing anything.


regards,
Pablo

  reply	other threads:[~2004-08-10 10:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-09 21:28 ESP spi/sequence tracking and nat Kashyap Ashwin
2004-08-10 10:24 ` Pablo Neira [this message]
2004-08-10 11:01 ` Henrik Nordstrom
2004-08-16 15:45 ` Michael Richardson

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=4118A25C.5010103@eurodev.net \
    --to=pablo@eurodev.net \
    --cc=Ashwin.Kashyap@thomson.net \
    --cc=netfilter-devel@lists.netfilter.org \
    /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.