]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
libxt_conntrack: properly output negation symbol
authorJan Engelhardt <jengelh@medozas.de>
Sat, 4 Apr 2009 22:05:30 +0000 (00:05 +0200)
committerJan Engelhardt <jengelh@medozas.de>
Sat, 4 Apr 2009 22:05:30 +0000 (00:05 +0200)
Because the wrong flag was checked, the "!" was either wrongly
printed, or not printed at all.
This was broken since v1.4.0-29-ga8ad34c.

Reported-by: Steven Jan Springl <steven@springl.ukfsn.org>
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
extensions/libxt_conntrack.c

index a3fcafcc4ae6cdb59f04cc7c4f9bc110b0441390..358b25513fcc2fc06d7c794c42bbd5693327026e 100644 (file)
@@ -910,7 +910,7 @@ conntrack_dump(const struct xt_conntrack_mtinfo1 *info, const char *prefix,
        }
 
        if (info->match_flags & XT_CONNTRACK_ORIGSRC) {
-               if (info->invert_flags & XT_CONNTRACK_PROTO)
+               if (info->invert_flags & XT_CONNTRACK_ORIGSRC)
                        printf("! ");
                printf("%sctorigsrc ", prefix);
                conntrack_dump_addr(&info->origsrc_addr, &info->origsrc_mask,
@@ -918,7 +918,7 @@ conntrack_dump(const struct xt_conntrack_mtinfo1 *info, const char *prefix,
        }
 
        if (info->match_flags & XT_CONNTRACK_ORIGDST) {
-               if (info->invert_flags & XT_CONNTRACK_PROTO)
+               if (info->invert_flags & XT_CONNTRACK_ORIGDST)
                        printf("! ");
                printf("%sctorigdst ", prefix);
                conntrack_dump_addr(&info->origdst_addr, &info->origdst_mask,
@@ -926,7 +926,7 @@ conntrack_dump(const struct xt_conntrack_mtinfo1 *info, const char *prefix,
        }
 
        if (info->match_flags & XT_CONNTRACK_REPLSRC) {
-               if (info->invert_flags & XT_CONNTRACK_PROTO)
+               if (info->invert_flags & XT_CONNTRACK_REPLSRC)
                        printf("! ");
                printf("%sctreplsrc ", prefix);
                conntrack_dump_addr(&info->replsrc_addr, &info->replsrc_mask,
@@ -934,7 +934,7 @@ conntrack_dump(const struct xt_conntrack_mtinfo1 *info, const char *prefix,
        }
 
        if (info->match_flags & XT_CONNTRACK_REPLDST) {
-               if (info->invert_flags & XT_CONNTRACK_PROTO)
+               if (info->invert_flags & XT_CONNTRACK_REPLDST)
                        printf("! ");
                printf("%sctrepldst ", prefix);
                conntrack_dump_addr(&info->repldst_addr, &info->repldst_mask,