Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 198565
b: refs/heads/master
c: fc35077
h: refs/heads/master
i:
  198563: c417326
v: v3
  • Loading branch information
Joerg Marx authored and Patrick McHardy committed May 20, 2010
1 parent d303e62 commit 10fcf00
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a1d7c1b4b8dfbc5ecadcff9284d64bb6ad4c0196
refs/heads/master: fc350777c705a39a312728ac5e8a6f164a828f5d
2 changes: 1 addition & 1 deletion trunk/include/net/netfilter/nf_conntrack_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ static inline int nf_conntrack_confirm(struct sk_buff *skb)
int ret = NF_ACCEPT;

if (ct && ct != &nf_conntrack_untracked) {
if (!nf_ct_is_confirmed(ct) && !nf_ct_is_dying(ct))
if (!nf_ct_is_confirmed(ct))
ret = __nf_conntrack_confirm(skb);
if (likely(ret == NF_ACCEPT))
nf_ct_deliver_cached_events(ct);
Expand Down
10 changes: 10 additions & 0 deletions trunk/net/netfilter/nf_conntrack_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,16 @@ __nf_conntrack_confirm(struct sk_buff *skb)

spin_lock_bh(&nf_conntrack_lock);

/* We have to check the DYING flag inside the lock to prevent
a race against nf_ct_get_next_corpse() possibly called from
user context, else we insert an already 'dead' hash, blocking
further use of that particular connection -JM */

if (unlikely(nf_ct_is_dying(ct))) {
spin_unlock_bh(&nf_conntrack_lock);
return NF_ACCEPT;
}

/* See if there's one in the list already, including reverse:
NAT could have grabbed it without realizing, since we're
not in the hash. If there is, we lost race. */
Expand Down

0 comments on commit 10fcf00

Please sign in to comment.