]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
libxt_conntrack: fix --ctdir save/dump output format
authorFlorian Westphal <fwestphal@astaro.com>
Wed, 17 Nov 2010 14:54:18 +0000 (15:54 +0100)
committerPatrick McHardy <kaber@trash.net>
Wed, 17 Nov 2010 14:54:18 +0000 (15:54 +0100)
$ iptables-save | iptables-restore
iptables-restore v1.4.6: conntrack: Bad value for "--ctdir" option: "ORIGINAL-j"

Signed-off-by: Florian Westphal <fwestphal@astaro.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
extensions/libxt_conntrack.c

index 6c4a9cd15e211a02468331972e807253c66eee80..dd3fb6fcccf4f8e50bdec51790c09e0ecfb38d57 100644 (file)
@@ -974,9 +974,9 @@ matchinfo_print(const void *ip, const struct xt_entry_match *match, int numeric,
 
        if (sinfo->flags & XT_CONNTRACK_DIRECTION) {
                if (sinfo->invflags & XT_CONNTRACK_DIRECTION)
-                       printf("%sctdir REPLY", optpfx);
+                       printf("%sctdir REPLY ", optpfx);
                else
-                       printf("%sctdir ORIGINAL", optpfx);
+                       printf("%sctdir ORIGINAL ", optpfx);
        }
 
 }
@@ -1079,9 +1079,9 @@ conntrack_dump(const struct xt_conntrack_mtinfo2 *info, const char *prefix,
 
        if (info->match_flags & XT_CONNTRACK_DIRECTION) {
                if (info->invert_flags & XT_CONNTRACK_DIRECTION)
-                       printf("%sctdir REPLY", prefix);
+                       printf("%sctdir REPLY ", prefix);
                else
-                       printf("%sctdir ORIGINAL", prefix);
+                       printf("%sctdir ORIGINAL ", prefix);
        }
 }