ip: Use regular htons() for non-constant protocol number in L2_BUF_IP4_PSUM
instead of htons_constant(), which is for... constants.
Fixes: 5bf200ae8a
("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>
This commit is contained in:
parent
137ce01789
commit
383a6f67e5
1 changed files with 1 additions and 1 deletions
2
ip.h
2
ip.h
|
@ -38,7 +38,7 @@
|
||||||
.daddr = 0, \
|
.daddr = 0, \
|
||||||
}
|
}
|
||||||
#define L2_BUF_IP4_PSUM(proto) ((uint32_t)htons_constant(0x4500) + \
|
#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) \
|
#define L2_BUF_IP6_INIT(proto) \
|
||||||
{ \
|
{ \
|
||||||
|
|
Loading…
Reference in a new issue