Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / net / netfilter / xt_conntrack.c
index 39681f10291c13a8a72efbfebad857ca10a7d750..e536710ad916246a4f558eaad02092d4c81168df 100644 (file)
@@ -123,11 +123,12 @@ conntrack_mt(const struct sk_buff *skb, struct xt_action_param *par,
 
        ct = nf_ct_get(skb, &ctinfo);
 
-       if (ct == &nf_conntrack_untracked)
-               statebit = XT_CONNTRACK_STATE_UNTRACKED;
-       else if (ct != NULL)
-               statebit = XT_CONNTRACK_STATE_BIT(ctinfo);
-       else
+       if (ct) {
+               if (nf_ct_is_untracked(ct))
+                       statebit = XT_CONNTRACK_STATE_UNTRACKED;
+               else
+                       statebit = XT_CONNTRACK_STATE_BIT(ctinfo);
+       } else
                statebit = XT_CONNTRACK_STATE_INVALID;
 
        if (info->match_flags & XT_CONNTRACK_STATE) {