diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2024-11-27 14:54:08 +1100 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2024-11-28 14:03:16 +0100 |
commit | 2abf5ab7f3734eae9377cfab4759ae83fabf3a7e (patch) | |
tree | 52228cc67321b7565287eb60211f54308173abe9 /pasta.c | |
parent | 08ea3cc581beed16afff3fa934f31cbdb82cbb95 (diff) | |
download | passt-2abf5ab7f3734eae9377cfab4759ae83fabf3a7e.tar passt-2abf5ab7f3734eae9377cfab4759ae83fabf3a7e.tar.gz passt-2abf5ab7f3734eae9377cfab4759ae83fabf3a7e.tar.bz2 passt-2abf5ab7f3734eae9377cfab4759ae83fabf3a7e.tar.lz passt-2abf5ab7f3734eae9377cfab4759ae83fabf3a7e.tar.xz passt-2abf5ab7f3734eae9377cfab4759ae83fabf3a7e.tar.zst passt-2abf5ab7f3734eae9377cfab4759ae83fabf3a7e.zip |
tcp: Merge tcp_update_check_tcp[46]()
The only reason we need separate functions for the IPv4 and IPv6 case is
to calculate the checksum of the IP pseudo-header, which is different for
the two cases. However, the caller already knows which path it's on and
can access the values needed for the pseudo-header partial sum more easily
than tcp_update_check_tcp[46]() can.
So, merge these functions into a single tcp_update_csum() function that
just takes the pseudo-header partial sum, calculated in the caller.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'pasta.c')
0 files changed, 0 insertions, 0 deletions