diff options
author | Stefano Brivio <sbrivio@redhat.com> | 2024-03-05 22:50:22 +0100 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2024-03-08 10:31:14 +0100 |
commit | 383a6f67e50bbaf63427c9a2dddfd0c22a886160 (patch) | |
tree | 7396eb53bf48c1eb10378f4d5cd924e24df221fb | |
parent | 137ce017896b2b64f8c45a8ddefbaed2cb71c445 (diff) | |
download | passt-383a6f67e50bbaf63427c9a2dddfd0c22a886160.tar passt-383a6f67e50bbaf63427c9a2dddfd0c22a886160.tar.gz passt-383a6f67e50bbaf63427c9a2dddfd0c22a886160.tar.bz2 passt-383a6f67e50bbaf63427c9a2dddfd0c22a886160.tar.lz passt-383a6f67e50bbaf63427c9a2dddfd0c22a886160.tar.xz passt-383a6f67e50bbaf63427c9a2dddfd0c22a886160.tar.zst passt-383a6f67e50bbaf63427c9a2dddfd0c22a886160.zip |
ip: Use regular htons() for non-constant protocol number in L2_BUF_IP4_PSUM
instead of htons_constant(), which is for... constants.
Fixes: 5bf200ae8a1a ("tcp, udp: Don't include destination address in partially precomputed csums")
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
-rw-r--r-- | ip.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -38,7 +38,7 @@ .daddr = 0, \ } #define L2_BUF_IP4_PSUM(proto) ((uint32_t)htons_constant(0x4500) + \ - (uint32_t)htons_constant(0xff00 | (proto))) + (uint32_t)htons(0xff00 | (proto))) #define L2_BUF_IP6_INIT(proto) \ { \ |