extensions: libxt_conntrack: remove always-false conditionals 55/290855/1 accepted/tizen_8.0_base accepted/tizen_base_dev tizen_8.0_base accepted/tizen/8.0/base/20231005.044812 accepted/tizen/base/20230405.234824 accepted/tizen/base/dev/20230602.080731 accepted/tizen/base/toolchain/20240311.164253 tizen_8.0_m2_release
authorFlorian Westphal <fw@strlen.de>
Sat, 23 Jul 2022 18:25:49 +0000 (20:25 +0200)
committerDongkyun Son <dongkyun.s@samsung.com>
Tue, 4 Apr 2023 08:00:50 +0000 (17:00 +0900)
libxt_conntrack.c:1292: warning: the comparison will always evaluate as
false for the address of origsrc_addr will never be NULL [-Waddress]

Backport commit:
https://git.netfilter.org/iptables/commit/?id=e88085ac41b4c962e1d85dcc8dc6fa0d1f80dc12

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

index 72c5220..80780d8 100644 (file)
@@ -1287,9 +1287,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 ?
                             "!= " : "");
@@ -1299,9 +1296,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 ?
                             "!= " : "");
@@ -1311,9 +1305,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 ?
                             "!= " : "");
@@ -1323,9 +1314,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 ?
                             "!= " : "");