[NET]: Detect hardware rx checksum faults correctly
[safe/jmp/linux-2.6] / net / ipv4 / netfilter / ip_conntrack_proto_tcp.c
index d6701ca..468c600 100644 (file)
@@ -362,8 +362,12 @@ static int nfattr_to_tcp(struct nfattr *cda[], struct ip_conntrack *ct)
        struct nfattr *attr = cda[CTA_PROTOINFO_TCP-1];
        struct nfattr *tb[CTA_PROTOINFO_TCP_MAX];
 
-        if (nfattr_parse_nested(tb, CTA_PROTOINFO_TCP_MAX, attr) < 0)
-                goto nfattr_failure;
+       /* updates could not contain anything about the private
+        * protocol info, in that case skip the parsing */
+       if (!attr)
+               return 0;
+
+        nfattr_parse_nested(tb, CTA_PROTOINFO_TCP_MAX, attr);
 
        if (!tb[CTA_PROTOINFO_TCP_STATE-1])
                return -EINVAL;
@@ -374,9 +378,6 @@ static int nfattr_to_tcp(struct nfattr *cda[], struct ip_conntrack *ct)
        write_unlock_bh(&tcp_lock);
 
        return 0;
-
-nfattr_failure:
-       return -1;
 }
 #endif