Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: dst.h: Fix shifting signed 32-bit value by 31 bits problem

Fix DST_FEATURE_ECN_CA to use "U" cast to avoid shifting signed
32-bit value by 31 bits problem.

Signed-off-by: Vandana BN <bnvandana@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Vandana BN and committed by
David S. Miller
40f6a2cb dca895b6

+1 -1
+1 -1
include/net/dst.h
··· 183 183 } 184 184 185 185 /* Kernel-internal feature bits that are unallocated in user space. */ 186 - #define DST_FEATURE_ECN_CA (1 << 31) 186 + #define DST_FEATURE_ECN_CA (1U << 31) 187 187 188 188 #define DST_FEATURE_MASK (DST_FEATURE_ECN_CA) 189 189 #define DST_FEATURE_ECN_MASK (DST_FEATURE_ECN_CA | RTAX_FEATURE_ECN)