netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Justin Yaple <yaplej@gmail.com>
To: Bruno Moreira Guedes <thbmatrix@gmail.com>
Cc: netfilter-devel <netfilter-devel@vger.kernel.org>
Subject: Re: Recalculate checksums in netfilter queue
Date: Thu, 22 Apr 2010 15:12:41 -0700	[thread overview]
Message-ID: <q2q8363055a1004221512v530eccffr1d29eef2e9d55475@mail.gmail.com> (raw)
In-Reply-To: <z2o3fdd6ce01004221432yec6c907bz4124144d403be1b4@mail.gmail.com>

> So, talking about the topic - implementing checksum functions on
> netfilter_queue, it would be useful to nfq_set_verdict subcall a
> function which check if the checksums(tcp, ip, udp, anything else) are
> set to 0, and then(if it's 0) it change the ckecksum automatically -
> something like the kernel does when we send a packet through a RAW
> socket.
>
> --Bruno Moreira Guedes

I think thats a great idea.  If the functions were included in the
library you could have nfq_set_verdict call them if any of the
checksums are set to 0.  This would give you the option of either
calling the function yourself, or just setting the checksum to 0 then
let the nfq_set_verdict call the functions to recalculate them.

So maybe it could be implemented like the checksum functions used in
the kernel where the base checksum function is the same, but takes
parameters to determine what protocol the checksum is being calculated
for.  Then a wrapper function is made for each protocol type ip, tcp,
udp...

-Justin.

  parent reply	other threads:[~2010-04-22 22:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-21  1:02 Recalculate checksums in netfilter queue Justin Yaple
2010-04-21  2:02 ` Bruno Moreira Guedes
2010-04-22  3:15   ` Justin Yaple
2010-04-22 12:43     ` Morgon.J.Kanter
2010-04-22 20:19       ` Justin Yaple
     [not found]         ` <z2o3fdd6ce01004221432yec6c907bz4124144d403be1b4@mail.gmail.com>
2010-04-22 22:12           ` Justin Yaple [this message]
2010-04-22 19:37     ` James King

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=q2q8363055a1004221512v530eccffr1d29eef2e9d55475@mail.gmail.com \
    --to=yaplej@gmail.com \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=thbmatrix@gmail.com \
    /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).