]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
libxtables: Revert change to struct xtables_pprot
authorPhil Sutter <phil@nwl.cc>
Thu, 5 May 2022 22:11:47 +0000 (00:11 +0200)
committerPhil Sutter <phil@nwl.cc>
Wed, 11 May 2022 10:02:39 +0000 (12:02 +0200)
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>
include/xtables.h

index 8c1065bc7e010fc358d2aac1c89d309d16ffc76a..c2694b7b288863e8c411c1aa0813c3d99d3c1f72 100644 (file)
@@ -395,7 +395,7 @@ struct xtables_rule_match {
  */
 struct xtables_pprot {
        const char *name;
-       uint16_t num;
+       uint8_t num;
 };
 
 enum xtables_tryload {