From 383a6f67e50bbaf63427c9a2dddfd0c22a886160 Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Tue, 5 Mar 2024 22:50:22 +0100 Subject: 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 Reviewed-by: David Gibson --- ip.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) \ { \ -- cgit v1.2.3