]> git.baikalelectronics.ru Git - kernel.git/commit
[NETFILTER] CLUSTERIP: introduce reference counting for entries
authorKOVACS Krisztian <hidden@balabit.hu>
Fri, 16 Sep 2005 23:59:46 +0000 (16:59 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 16 Sep 2005 23:59:46 +0000 (16:59 -0700)
commite780c037fde2591843922237ea5129e3fbb35fb7
tree2f7d272bcb83011ea7df364f01ad08574701cf86
parentb0aae04076bc9af7c45de8f7d151c2256d077793
[NETFILTER] CLUSTERIP: introduce reference counting for entries

The CLUSTERIP target creates a procfs entry for all different cluster
IPs.  Although more than one rules can refer to a single cluster IP (and
thus a single config structure), removal of the procfs entry is done
unconditionally in destroy(). In more complicated situations involving
deferred dereferencing of the config structure by procfs and creating a
new rule with the same cluster IP it's also possible that no entry will
be created for the new rule.

This patch fixes the problem by counting the number of entries
referencing a given config structure and moving the config list
manipulation and procfs entry deletion parts to the
clusterip_config_entry_put() function.

Signed-off-by: KOVACS Krisztian <hidden@balabit.hu>
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/netfilter/ipt_CLUSTERIP.c