Linux Netfilter discussions
 help / color / mirror / Atom feed
* netfilter-queue: Incorrect UDP checksum computation in nfq_udp_compute_checksum_ipv4
@ 2016-04-01  8:48 Mathias Koehrer
  2016-04-01 10:44 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 4+ messages in thread
From: Mathias Koehrer @ 2016-04-01  8:48 UTC (permalink / raw)
  To: netfilter

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-04-01 11:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-01  8:48 netfilter-queue: Incorrect UDP checksum computation in nfq_udp_compute_checksum_ipv4 Mathias Koehrer
2016-04-01 10:44 ` Pablo Neira Ayuso
2016-04-01 11:34   ` Mathias Koehrer
2016-04-01 11:39     ` Mathias Koehrer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox