[LEDE-DEV] [PATCH firewall3] iptables: add support for version 1.6.0

Ralph Sennhauser ralph.sennhauser at gmail.com
Fri Nov 4 06:41:10 PDT 2016


Account for the struct xtables_globals change and add API version 11 to
the supported APIs.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser at gmail.com>
---
 iptables.c | 6 ++++++
 iptables.h | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/iptables.c b/iptables.c
index 2a0d0ee..95fc0d4 100644
--- a/iptables.c
+++ b/iptables.c
@@ -29,12 +29,18 @@ static struct xtables_globals xtg = {
 	.option_offset = 0,
 	.program_version = "4",
 	.orig_opts = base_opts,
+#if XTABLES_VERSION_CODE > 10
+	.compat_rev = xtables_compatible_revision,
+#endif
 };
 
 static struct xtables_globals xtg6 = {
 	.option_offset = 0,
 	.program_version = "6",
 	.orig_opts = base_opts,
+#if XTABLES_VERSION_CODE > 10
+	.compat_rev = xtables_compatible_revision,
+#endif
 };
 
 static struct {
diff --git a/iptables.h b/iptables.h
index 892a0d4..bcd302d 100644
--- a/iptables.h
+++ b/iptables.h
@@ -34,7 +34,7 @@
 #define FW3_ID_MASK		0xffffff00
 
 /* xtables interface */
-#if (XTABLES_VERSION_CODE == 10)
+#if (XTABLES_VERSION_CODE == 10 || XTABLES_VERSION_CODE == 11)
 # include "xtables-10.h"
 #elif (XTABLES_VERSION_CODE == 5)
 # include "xtables-5.h"
-- 
2.7.3




More information about the Lede-dev mailing list