diff options
| author | Rusty Russell <rusty@rustcorp.com.au> | 2005-01-03 04:18:18 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-01-03 04:18:18 -0800 |
| commit | 4759d4d9134afe52efaab2a8c1867aa494f3e812 (patch) | |
| tree | b501443b1927e4feded946256942128015d1c20f /include/linux | |
| parent | 5ea39dfbe98e3d25f613c2edf6038e386b81fc1c (diff) | |
[PATCH] netfilter: Fix ip_ct_selective_cleanup(), and rename ip_ct_iterate_cleanup()
Several places use ip_ct_selective_cleanup() as a general iterator, which it
was not intended for (it takes a const ip_conntrack *). So rename it, and
make it take a non-const argument.
Also, it missed unconfirmed connections, which aren't in the hash table. This
introduces a potential problem for users which expect to iterate all
connections (such as the helper deletion code). So keep a linked list of
unconfirmed connections as well.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/netfilter_ipv4/ip_conntrack.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/netfilter_ipv4/ip_conntrack.h b/include/linux/netfilter_ipv4/ip_conntrack.h index afa5e0495f38..72945cf62370 100644 --- a/include/linux/netfilter_ipv4/ip_conntrack.h +++ b/include/linux/netfilter_ipv4/ip_conntrack.h @@ -283,10 +283,10 @@ extern int ip_ct_no_defrag; struct sk_buff * ip_ct_gather_frags(struct sk_buff *skb); -/* Delete all conntracks which match. */ +/* Iterate over all conntracks: if iter returns true, it's deleted. */ extern void -ip_ct_selective_cleanup(int (*kill)(const struct ip_conntrack *i, void *data), - void *data); +ip_ct_iterate_cleanup(int (*iter)(struct ip_conntrack *i, void *data), + void *data); /* It's confirmed if it is, or has been in the hash table. */ static inline int is_confirmed(struct ip_conntrack *ct) |
