]> git.ipfire.org Git - thirdparty/wireguard-go.git/commit
tun: use correct IP header comparisons in tcpGRO() and tcpPacketsCanCoalesce()
authorJordan Whited <jordan@tailscale.com>
Fri, 24 Mar 2023 23:23:42 +0000 (16:23 -0700)
committerJason A. Donenfeld <Jason@zx2c4.com>
Sat, 25 Mar 2023 22:13:38 +0000 (23:13 +0100)
commit052af4a8072bbbd3bfe7edf46fe3c1b350f71f08
tree448be165ffd8d385c63e3d93d77adf1f8b7427ef
parentaad7fca9c504effdaf3c77dd635e85c94dc4521d
tun: use correct IP header comparisons in tcpGRO() and tcpPacketsCanCoalesce()

tcpGRO() was using an incorrect IPv4 more fragments bit mask.

tcpPacketsCanCoalesce() was not distinguishing tcp6 from tcp4, and TTL
values were not compared. TTL values should be equal at the IP layer,
otherwise the packets should not coalesce. This tracks with the kernel.

Reviewed-by: Denton Gentry <dgentry@tailscale.com>
Signed-off-by: Jordan Whited <jordan@tailscale.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
tun/tcp_offload_linux.go
tun/tcp_offload_linux_test.go