Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 90706
b: refs/heads/master
c: 55871d0
h: refs/heads/master
v: v3
  • Loading branch information
Patrick McHardy committed Apr 14, 2008
1 parent c6e8d4e commit c447d1d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 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: 8c87238b726e543f8af4bdb4296020a328df4744
refs/heads/master: 55871d04793d9c069ee277b1e98794b88d92ed80
9 changes: 1 addition & 8 deletions trunk/include/net/netfilter/nf_conntrack.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,7 @@ union nf_conntrack_help {
#include <linux/timer.h>

#ifdef CONFIG_NETFILTER_DEBUG
#define NF_CT_ASSERT(x) \
do { \
if (!(x)) \
/* Wooah! I'm tripping my conntrack in a frenzy of \
netplay... */ \
printk("NF_CT_ASSERT: %s:%i(%s)\n", \
__FILE__, __LINE__, __FUNCTION__); \
} while(0)
#define NF_CT_ASSERT(x) WARN_ON(!(x))
#else
#define NF_CT_ASSERT(x)
#endif
Expand Down
3 changes: 3 additions & 0 deletions trunk/net/netfilter/nf_conntrack_extend.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ void *__nf_ct_ext_add(struct nf_conn *ct, enum nf_ct_ext_id id, gfp_t gfp)
int i, newlen, newoff;
struct nf_ct_ext_type *t;

/* Conntrack must not be confirmed to avoid races on reallocation. */
NF_CT_ASSERT(!nf_ct_is_confirmed(ct));

if (!ct->ext)
return nf_ct_ext_create(&ct->ext, id, gfp);

Expand Down

0 comments on commit c447d1d

Please sign in to comment.