>From 9e8aa4ed079b526faf190b69a2c1032f22776602 Mon Sep 17 00:00:00 2001 From: Ken-ichirou MATSUZAWA <chamas@xxxxxxxxxxxxx> Date: Tue, 28 Feb 2017 11:34:29 +0900 Subject: [PATCH 2/2] conntrack: revert getobjopt_is_nat condition Signed-off-by: Ken-ichirou MATSUZAWA <chamas@xxxxxxxxxxxxx> --- src/conntrack/objopt.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/conntrack/objopt.c b/src/conntrack/objopt.c index fb43d6c..1581480 100644 --- a/src/conntrack/objopt.c +++ b/src/conntrack/objopt.c @@ -144,10 +144,8 @@ int __setobjopt(struct nf_conntrack *ct, unsigned int option) static int getobjopt_is_snat(const struct nf_conntrack *ct) { - if (!(test_bit(ATTR_STATUS, ct->head.set))) - return 0; - - if (!(ct->status & IPS_SRC_NAT_DONE)) + if (test_bit(ATTR_STATUS, ct->head.set) && + !(ct->status & IPS_SRC_NAT_DONE)) return 0; switch (ct->head.orig.l3protonum) { @@ -166,10 +164,8 @@ static int getobjopt_is_snat(const struct nf_conntrack *ct) static int getobjopt_is_dnat(const struct nf_conntrack *ct) { - if (!(test_bit(ATTR_STATUS, ct->head.set))) - return 0; - - if (!(ct->status & IPS_DST_NAT_DONE)) + if (test_bit(ATTR_STATUS, ct->head.set) && + !(ct->status & IPS_DST_NAT_DONE)) return 0; switch (ct->head.orig.l3protonum) { -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html