]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
iptables: state match incompatibilty across versions
authorPhil Oester <kernel@linuxace.com>
Wed, 7 Aug 2013 23:44:49 +0000 (16:44 -0700)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 8 Aug 2013 16:05:04 +0000 (18:05 +0200)
As reported in Debian bug #718810 [1], state match rules added in < 1.4.16
iptables versions are incorrectly displayed by >= 1.4.16 iptables versions.
Issue bisected to commit 0d701631 (libxt_state: replace as an alias to
xt_conntrack).

Fix this by adding the missing .print and .save functions for state match
aliases in the conntrack match.

[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=718810

Signed-off-by: Phil Oester <kernel@linuxace.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
extensions/libxt_conntrack.c

index 9f7b5db2001d81553499366008e52a55432bbedd..128bbd20a34c245479da0d8a6aed380232f4e6cc 100644 (file)
@@ -1272,6 +1272,8 @@ static struct xtables_match conntrack_mt_reg[] = {
                .size          = XT_ALIGN(sizeof(struct xt_conntrack_mtinfo1)),
                .userspacesize = XT_ALIGN(sizeof(struct xt_conntrack_mtinfo1)),
                .help          = state_help,
+               .print         = state_print,
+               .save          = state_save,
                .x6_parse      = state_ct1_parse,
                .x6_options    = state_opts,
        },
@@ -1285,6 +1287,8 @@ static struct xtables_match conntrack_mt_reg[] = {
                .size          = XT_ALIGN(sizeof(struct xt_conntrack_mtinfo2)),
                .userspacesize = XT_ALIGN(sizeof(struct xt_conntrack_mtinfo2)),
                .help          = state_help,
+               .print         = state_print,
+               .save          = state_save,
                .x6_parse      = state_ct23_parse,
                .x6_options    = state_opts,
        },
@@ -1298,6 +1302,8 @@ static struct xtables_match conntrack_mt_reg[] = {
                .size          = XT_ALIGN(sizeof(struct xt_conntrack_mtinfo3)),
                .userspacesize = XT_ALIGN(sizeof(struct xt_conntrack_mtinfo3)),
                .help          = state_help,
+               .print         = state_print,
+               .save          = state_save,
                .x6_parse      = state_ct23_parse,
                .x6_options    = state_opts,
        },