[NETFILTER]: xt_conntrack: fix missing boolean clamping
authorJan Engelhardt <jengelh@computergmbh.de>
Wed, 27 Feb 2008 20:09:05 +0000 (12:09 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 27 Feb 2008 20:09:05 +0000 (12:09 -0800)
Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/netfilter/xt_conntrack.c

index 8533085..dd192ac 100644 (file)
@@ -231,7 +231,7 @@ conntrack_mt(const struct sk_buff *skb, const struct net_device *in,
                        if (test_bit(IPS_DST_NAT_BIT, &ct->status))
                                statebit |= XT_CONNTRACK_STATE_DNAT;
                }
-               if ((info->state_mask & statebit) ^
+               if (!!(info->state_mask & statebit) ^
                    !(info->invert_flags & XT_CONNTRACK_STATE))
                        return false;
        }