netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Jan Andres <jandres@gmx.net>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH] ulogd2: Fix length handling in PCAP output
Date: Mon, 06 Sep 2010 14:07:52 +0200	[thread overview]
Message-ID: <4C84D998.3010801@netfilter.org> (raw)
In-Reply-To: <20100905162857.GA9778@pitr.home.jan>

On 05/09/10 18:29, Jan Andres wrote:
> Currently, the PCAP output plugin uses ip.totlen to determine both the
> "len" and "caplen" pcap header fields, as well as the amount of packet
> data written to the file. There are two issues with this:
> 
> - For obvious reasons it doesn't work for IPv6.
> 
> - AFAICT, in case of an incompletely captured packet (--nflog-range)
>   it will attempt to write out the whole packet, not just the part
>   captured.
> 
> This patch changes the behavior to:
> 
> - Use raw.pktlen to set the "caplen" field, and the amount of data
>   written.
> 
> - Determine the "len" (original length) field from ip.totlen or
>   ip6.payload_len if possible, default to the same value as "caplen"
>   otherwise.
> 
> Signed-off-by: Jan Andres <jandres@gmx.net>

Applied, thanks Jan.

      reply	other threads:[~2010-09-06 12:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-05 16:29 [PATCH] ulogd2: Fix length handling in PCAP output Jan Andres
2010-09-06 12:07 ` Pablo Neira Ayuso [this message]

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=4C84D998.3010801@netfilter.org \
    --to=pablo@netfilter.org \
    --cc=jandres@gmx.net \
    --cc=netfilter-devel@vger.kernel.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 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).