aboutgitcodebugslistschat
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2024-03-05 22:50:22 +0100
committerStefano Brivio <sbrivio@redhat.com>2024-03-08 10:31:14 +0100
commit383a6f67e50bbaf63427c9a2dddfd0c22a886160 (patch)
tree7396eb53bf48c1eb10378f4d5cd924e24df221fb
parent137ce017896b2b64f8c45a8ddefbaed2cb71c445 (diff)
downloadpasst-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.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/ip.h b/ip.h
index 9be4778..b9aedf6 100644
--- a/ip.h
+++ b/ip.h
@@ -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) \
{ \