summaryrefslogtreecommitdiffstats
path: root/include/net/dst.h
diff options
context:
space:
mode:
authorVandana BN2019-07-01 13:55:39 +0200
committerDavid S. Miller2019-07-01 19:48:34 +0200
commit40f6a2cb9cfc5da713f745b23bcc2c6761e5eb5e (patch)
tree217eac4701fdb7f8ed5be2bf08f30fd6523dc2ec /include/net/dst.h
parentDocumentation/networking: fix default_ttl typo in mpls-sysctl (diff)
downloadkernel-qcow2-linux-40f6a2cb9cfc5da713f745b23bcc2c6761e5eb5e.tar.gz
kernel-qcow2-linux-40f6a2cb9cfc5da713f745b23bcc2c6761e5eb5e.tar.xz
kernel-qcow2-linux-40f6a2cb9cfc5da713f745b23bcc2c6761e5eb5e.zip
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>
Diffstat (limited to 'include/net/dst.h')
-rw-r--r--include/net/dst.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/dst.h b/include/net/dst.h
index f8206d3fed2f..fe62fe2eb781 100644
--- a/include/net/dst.h
+++ b/include/net/dst.h
@@ -183,7 +183,7 @@ static inline void dst_metric_set(struct dst_entry *dst, int metric, u32 val)
}
/* Kernel-internal feature bits that are unallocated in user space. */
-#define DST_FEATURE_ECN_CA (1 << 31)
+#define DST_FEATURE_ECN_CA (1U << 31)
#define DST_FEATURE_MASK (DST_FEATURE_ECN_CA)
#define DST_FEATURE_ECN_MASK (DST_FEATURE_ECN_CA | RTAX_FEATURE_ECN)