You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
iptables/SOURCES/0079-libxtables-Revert-chan...

36 lines
1.1 KiB

From 796255fce0465d03b89f40820ade913ac7e10927 Mon Sep 17 00:00:00 2001
From: Phil Sutter <phil@nwl.cc>
Date: Fri, 6 May 2022 00:11:47 +0200
Subject: [PATCH] libxtables: Revert change to struct xtables_pprot
While protocol values may exceed eight bits, the data structure is
indeed used only to store the static list of name/value pairs for faster
lookups. None of those has such a value and if one is added in future,
the compiler will complain about it.
So restore the old field type to retain binary compatibility.
Fixes: 556f704458cdb ("Use proto_to_name() from xshared in more places")
Signed-off-by: Phil Sutter <phil@nwl.cc>
(cherry picked from commit a7c2b7289cd31455b854fee7d5c735c6270518a3)
---
include/xtables.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/xtables.h b/include/xtables.h
index 06982e720cbb8..d77a73a4303a7 100644
--- a/include/xtables.h
+++ b/include/xtables.h
@@ -395,7 +395,7 @@ struct xtables_rule_match {
*/
struct xtables_pprot {
const char *name;
- uint16_t num;
+ uint8_t num;
};
enum xtables_tryload {
--
2.41.0