From: Mathias Koehrer <mathias.koehrer@etas.com>
To: netfilter@vger.kernel.org
Subject: netfilter-queue: Incorrect UDP checksum computation in nfq_udp_compute_checksum_ipv4
Date: Fri, 1 Apr 2016 10:48:02 +0200 [thread overview]
Message-ID: <56FE35C2.2070202@etas.com> (raw)
Hi all,
the function nfq_udp_compute_checksum_ipv4 (src/extra/udp.c) does not
compute the correct UDP checksum.
The issue is caused by the called function checksum_tcpudp_ipv4()
(src/extra/checksum.c) that uses the hard coded protocol id IPPROTO_TCP
which is fine for TCP but fails for UDP.
A possible solution might be to pass the protocol id (IPPROTO_TCP /
IPPROTOC_UDP) as parameter to the function checksum_tcpudp_ipv4().
The very same is also true for the IPv6 versions of these functions.
Any feedback is welcome.
Best regards
Mathias
next reply other threads:[~2016-04-01 8:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-01 8:48 Mathias Koehrer [this message]
2016-04-01 10:44 ` netfilter-queue: Incorrect UDP checksum computation in nfq_udp_compute_checksum_ipv4 Pablo Neira Ayuso
2016-04-01 11:34 ` Mathias Koehrer
2016-04-01 11:39 ` Mathias Koehrer
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=56FE35C2.2070202@etas.com \
--to=mathias.koehrer@etas.com \
--cc=netfilter@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