From: Florian Westphal <fw@strlen.de>
To: Stanislav Fomichev <stfomichev@yandex-team.ru>
Cc: netfilter-devel@vger.kernel.org, pablo@netfilter.org,
kaber@trash.net, kadlec@blackhole.kfki.hu
Subject: Re: [PATCH] netfilter: skip checksum verification for outgoing rejected ipv6 packets
Date: Tue, 22 Oct 2013 12:55:40 +0200 [thread overview]
Message-ID: <20131022105540.GD12157@breakpoint.cc> (raw)
In-Reply-To: <20131022083631.GA28194@stfomichev-desktop>
Stanislav Fomichev <stfomichev@yandex-team.ru> wrote:
> /* Check checksum. */
> - if (csum_ipv6_magic(&oip6h->saddr, &oip6h->daddr, otcplen, IPPROTO_TCP,
> + if (hook != NF_INET_LOCAL_OUT &&
> + csum_ipv6_magic(&oip6h->saddr, &oip6h->daddr, otcplen, IPPROTO_TCP,
> skb_checksum(oldskb, tcphoff, otcplen, 0))) {
Could you try using nf_ip6_checksum() here instead of csum_ipv6_magic()?
It has the advantage that it will also skip checksumming in case inbound
packets have already been validated by hardware, etc.
Also this should do the right thing in any case (e.g. local packet
in POST_ROUTING).
next prev parent reply other threads:[~2013-10-22 10:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-22 8:36 [PATCH] netfilter: skip checksum verification for outgoing rejected ipv6 packets Stanislav Fomichev
2013-10-22 10:55 ` Florian Westphal [this message]
2013-10-22 12:40 ` Stanislav Fomichev
2013-10-22 12:43 ` [PATCH v2] " Stanislav Fomichev
2013-10-23 9:22 ` Pablo Neira Ayuso
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=20131022105540.GD12157@breakpoint.cc \
--to=fw@strlen.de \
--cc=kaber@trash.net \
--cc=kadlec@blackhole.kfki.hu \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=stfomichev@yandex-team.ru \
/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).