]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
extensions: libxt_conntrack: remove always-false conditionals
authorFlorian Westphal <fw@strlen.de>
Sat, 23 Jul 2022 18:25:49 +0000 (20:25 +0200)
committerFlorian Westphal <fw@strlen.de>
Sat, 23 Jul 2022 18:25:49 +0000 (20:25 +0200)
libxt_conntrack.c:1292: warning: the comparison will always evaluate as
false for the address of origsrc_addr will never be NULL [-Waddress]

Signed-off-by: Florian Westphal <fw@strlen.de>
extensions/libxt_conntrack.c

index 234085c5211c6428b4448fcf6a4023db325fa34f..08dba42db5a18d4a8103089d629727b47ebc8e43 100644 (file)
@@ -1289,9 +1289,6 @@ static int _conntrack3_mt_xlate(struct xt_xlate *xl,
        }
 
        if (sinfo->match_flags & XT_CONNTRACK_ORIGSRC) {
-               if (&sinfo->origsrc_addr == 0L)
-                       return 0;
-
                xt_xlate_add(xl, "%sct original saddr %s", space,
                             sinfo->invert_flags & XT_CONNTRACK_ORIGSRC ?
                             "!= " : "");
@@ -1301,9 +1298,6 @@ static int _conntrack3_mt_xlate(struct xt_xlate *xl,
        }
 
        if (sinfo->match_flags & XT_CONNTRACK_ORIGDST) {
-               if (&sinfo->origdst_addr == 0L)
-                       return 0;
-
                xt_xlate_add(xl, "%sct original daddr %s", space,
                             sinfo->invert_flags & XT_CONNTRACK_ORIGDST ?
                             "!= " : "");
@@ -1313,9 +1307,6 @@ static int _conntrack3_mt_xlate(struct xt_xlate *xl,
        }
 
        if (sinfo->match_flags & XT_CONNTRACK_REPLSRC) {
-               if (&sinfo->replsrc_addr == 0L)
-                       return 0;
-
                xt_xlate_add(xl, "%sct reply saddr %s", space,
                             sinfo->invert_flags & XT_CONNTRACK_REPLSRC ?
                             "!= " : "");
@@ -1325,9 +1316,6 @@ static int _conntrack3_mt_xlate(struct xt_xlate *xl,
        }
 
        if (sinfo->match_flags & XT_CONNTRACK_REPLDST) {
-               if (&sinfo->repldst_addr == 0L)
-                       return 0;
-
                xt_xlate_add(xl, "%sct reply daddr %s", space,
                             sinfo->invert_flags & XT_CONNTRACK_REPLDST ?
                             "!= " : "");