[iptables PATCH 5/5] libxtables: Revert change to struct xtables_pprot

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>
---
 include/xtables.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/xtables.h b/include/xtables.h
index 8c1065bc7e010..c2694b7b28886 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.34.1




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux