|
@@ -901,10 +901,18 @@ __nf_conntrack_confirm(struct sk_buff *skb)
|
|
|
* REJECT will give spurious warnings here.
|
|
* REJECT will give spurious warnings here.
|
|
|
*/
|
|
*/
|
|
|
|
|
|
|
|
- /* No external references means no one else could have
|
|
|
|
|
- * confirmed us.
|
|
|
|
|
|
|
+ /* Another skb with the same unconfirmed conntrack may
|
|
|
|
|
+ * win the race. This may happen for bridge(br_flood)
|
|
|
|
|
+ * or broadcast/multicast packets do skb_clone with
|
|
|
|
|
+ * unconfirmed conntrack.
|
|
|
*/
|
|
*/
|
|
|
- WARN_ON(nf_ct_is_confirmed(ct));
|
|
|
|
|
|
|
+ if (unlikely(nf_ct_is_confirmed(ct))) {
|
|
|
|
|
+ WARN_ON_ONCE(1);
|
|
|
|
|
+ nf_conntrack_double_unlock(hash, reply_hash);
|
|
|
|
|
+ local_bh_enable();
|
|
|
|
|
+ return NF_DROP;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
pr_debug("Confirming conntrack %p\n", ct);
|
|
pr_debug("Confirming conntrack %p\n", ct);
|
|
|
/* We have to check the DYING flag after unlink to prevent
|
|
/* We have to check the DYING flag after unlink to prevent
|
|
|
* a race against nf_ct_get_next_corpse() possibly called from
|
|
* a race against nf_ct_get_next_corpse() possibly called from
|