|
|
6ef253 |
From fe1ac5eaa8ae482c9112aed6b89f9f2e529f4516 Mon Sep 17 00:00:00 2001
|
|
|
6ef253 |
From: Phil Sutter <psutter@redhat.com>
|
|
|
6ef253 |
Date: Tue, 10 Dec 2019 12:27:13 +0100
|
|
|
6ef253 |
Subject: [PATCH] uapi: netfilter: Avoid undefined left-shift in xt_sctp.h
|
|
|
6ef253 |
|
|
|
6ef253 |
This is a backport of kernel commit 164166558aace ("netfilter: uapi:
|
|
|
6ef253 |
Avoid undefined left-shift in xt_sctp.h").
|
|
|
6ef253 |
|
|
|
6ef253 |
Signed-off-by: Phil Sutter <psutter@redhat.com>
|
|
|
6ef253 |
---
|
|
|
6ef253 |
include/linux/netfilter/xt_sctp.h | 6 +++---
|
|
|
6ef253 |
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
6ef253 |
|
|
|
6ef253 |
diff --git a/include/linux/netfilter/xt_sctp.h b/include/linux/netfilter/xt_sctp.h
|
|
|
6ef253 |
index a501e6196905d..5b28525a2482a 100644
|
|
|
6ef253 |
--- a/include/linux/netfilter/xt_sctp.h
|
|
|
6ef253 |
+++ b/include/linux/netfilter/xt_sctp.h
|
|
|
6ef253 |
@@ -40,19 +40,19 @@ struct xt_sctp_info {
|
|
|
6ef253 |
#define SCTP_CHUNKMAP_SET(chunkmap, type) \
|
|
|
6ef253 |
do { \
|
|
|
6ef253 |
(chunkmap)[type / bytes(__u32)] |= \
|
|
|
6ef253 |
- 1 << (type % bytes(__u32)); \
|
|
|
6ef253 |
+ 1u << (type % bytes(__u32)); \
|
|
|
6ef253 |
} while (0)
|
|
|
6ef253 |
|
|
|
6ef253 |
#define SCTP_CHUNKMAP_CLEAR(chunkmap, type) \
|
|
|
6ef253 |
do { \
|
|
|
6ef253 |
(chunkmap)[type / bytes(__u32)] &= \
|
|
|
6ef253 |
- ~(1 << (type % bytes(__u32))); \
|
|
|
6ef253 |
+ ~(1u << (type % bytes(__u32))); \
|
|
|
6ef253 |
} while (0)
|
|
|
6ef253 |
|
|
|
6ef253 |
#define SCTP_CHUNKMAP_IS_SET(chunkmap, type) \
|
|
|
6ef253 |
({ \
|
|
|
6ef253 |
((chunkmap)[type / bytes (__u32)] & \
|
|
|
6ef253 |
- (1 << (type % bytes (__u32)))) ? 1: 0; \
|
|
|
6ef253 |
+ (1u << (type % bytes (__u32)))) ? 1: 0; \
|
|
|
6ef253 |
})
|
|
|
6ef253 |
|
|
|
6ef253 |
#define SCTP_CHUNKMAP_RESET(chunkmap) \
|
|
|
6ef253 |
--
|
|
|
6ef253 |
2.24.0
|
|
|
6ef253 |
|