From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Maxime Bizon <mbizon@freebox.fr>
Cc: netdev <netdev@vger.kernel.org>, davem <davem@davemloft.net>,
kaber <kaber@trash.net>
Subject: Re: [PATCH] netfilter: fix bad checksum on IPv6 when NAT is performed
Date: Tue, 6 Oct 2015 16:28:44 +0200 [thread overview]
Message-ID: <20151006142844.GA14169@salvia> (raw)
In-Reply-To: <1444140652.14655.340.camel@sakura.staff.proxad.net>
On Tue, Oct 06, 2015 at 04:10:52PM +0200, Maxime Bizon wrote:
>
> With this setup:
>
> * non IPv6 checksumming capable network hardware
> * GRO off
> * IPv6 SNAT
>
> I get this when I receive an UDPv6 reply: "<unknown>: hw csum failure"
>
> Call trace:
>
> * nf_ip6_checksum() calls __skb_checksum_complete()
> * nf_nat_ipv6_csum_update() & nf_nat_ipv6_manip_pkt()
> * __udp6_lib_rcv() => udp6_csum_init()
> * __skb_checksum_validate_complete() "fastpath" fails because
> skb->csum is incorrect.
> * udpv6_recvmsg() => skb_copy_and_csum_datagram_msg()
>
> The last call computes a valid checksum despite CHECKSUM_COMPLETE and
> triggers the warning.
>
> When we perform NAT on IPv4, we also update the IPv4 checksum, so
> there is no side effect on skb->csum (since the csum over a valid IPv4
> header area is zero).
>
> But IPv6 doesn't have such header checksum, so when performing NAT we need to
> update skb->csum.
Please, resubmit and Cc netfilter-devel@vger.kernel.org.
Thanks.
next prev parent reply other threads:[~2015-10-06 14:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-06 14:10 [PATCH] netfilter: fix bad checksum on IPv6 when NAT is performed Maxime Bizon
2015-10-06 14:28 ` Pablo Neira Ayuso [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-10-06 14:23 Maxime Bizon
2015-10-08 20:19 ` Maxime Bizon
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=20151006142844.GA14169@salvia \
--to=pablo@netfilter.org \
--cc=davem@davemloft.net \
--cc=kaber@trash.net \
--cc=mbizon@freebox.fr \
--cc=netdev@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