···333333 /* Called when user tries to insert an entry of this type:334334 hook_mask is a bitmask of hooks from which it can be335335 called. */336336- /* Should return true or false, or an error code (-Exxxx). */336336+ /* Should return 0 on success or an error code otherwise (-Exxxx). */337337 int (*checkentry)(const struct xt_tgchk_param *);338338339339 /* Called when entry of this type deleted. */
+1-1
include/net/netfilter/nf_conntrack_core.h
···6161 int ret = NF_ACCEPT;62626363 if (ct && ct != &nf_conntrack_untracked) {6464- if (!nf_ct_is_confirmed(ct) && !nf_ct_is_dying(ct))6464+ if (!nf_ct_is_confirmed(ct))6565 ret = __nf_conntrack_confirm(skb);6666 if (likely(ret == NF_ACCEPT))6767 nf_ct_deliver_cached_events(ct);
+10
net/netfilter/nf_conntrack_core.c
···424424425425 spin_lock_bh(&nf_conntrack_lock);426426427427+ /* We have to check the DYING flag inside the lock to prevent428428+ a race against nf_ct_get_next_corpse() possibly called from429429+ user context, else we insert an already 'dead' hash, blocking430430+ further use of that particular connection -JM */431431+432432+ if (unlikely(nf_ct_is_dying(ct))) {433433+ spin_unlock_bh(&nf_conntrack_lock);434434+ return NF_ACCEPT;435435+ }436436+427437 /* See if there's one in the list already, including reverse:428438 NAT could have grabbed it without realizing, since we're429439 not in the hash. If there is, we lost race. */
+4-8
net/netfilter/nf_conntrack_sip.c
···1393139313941394 nf_ct_refresh(ct, skb, sip_timeout * HZ);1395139513961396- if (skb_is_nonlinear(skb)) {13971397- pr_debug("Copy of skbuff not supported yet.\n");13981398- return NF_ACCEPT;13991399- }13961396+ if (unlikely(skb_linearize(skb)))13971397+ return NF_DROP;1400139814011399 dptr = skb->data + dataoff;14021400 datalen = skb->len - dataoff;···1453145514541456 nf_ct_refresh(ct, skb, sip_timeout * HZ);1455145714561456- if (skb_is_nonlinear(skb)) {14571457- pr_debug("Copy of skbuff not supported yet.\n");14581458- return NF_ACCEPT;14591459- }14581458+ if (unlikely(skb_linearize(skb)))14591459+ return NF_DROP;1460146014611461 dptr = skb->data + dataoff;14621462 datalen = skb->len - dataoff;