summaryrefslogtreecommitdiff
path: root/src/sync-ftfw.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2012-01-04 14:31:41 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2012-01-10 01:54:45 +0100
commit79ab299bfb20b7fc1982ca90d77d8b908b824fea (patch)
treea7fe20e7685f967da400675c42fce9f6f634a30f /src/sync-ftfw.c
parent598e465087365db1fa36b67aa53d291e400ec5b1 (diff)
downloadconntrack-tools-79ab299bfb20b7fc1982ca90d77d8b908b824fea.tar.gz
conntrack-tools-79ab299bfb20b7fc1982ca90d77d8b908b824fea.zip
conntrackd: simplify cache_get_extra function
This patch simplifies cache_get_extra which now takes only one parameter that is the cache_object. With it, the extra area can be calculated. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/sync-ftfw.c')
-rw-r--r--src/sync-ftfw.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/sync-ftfw.c b/src/sync-ftfw.c
index cff4d25..c7cc4aa 100644
--- a/src/sync-ftfw.c
+++ b/src/sync-ftfw.c
@@ -169,8 +169,7 @@ static void ftfw_kill(void)
static int do_cache_to_tx(void *data1, void *data2)
{
struct cache_object *obj = data2;
- struct cache_ftfw *cn =
- cache_get_extra(STATE(mode)->internal->ct.data, obj);
+ struct cache_ftfw *cn = cache_get_extra(obj);
if (queue_in(rs_queue, &cn->qnode)) {
queue_del(&cn->qnode);
@@ -551,8 +550,7 @@ static void ftfw_xmit(void)
static void ftfw_enqueue(struct cache_object *obj, int type)
{
- struct cache_ftfw *cn =
- cache_get_extra(STATE(mode)->internal->ct.data, obj);
+ struct cache_ftfw *cn = cache_get_extra(obj);
if (queue_in(rs_queue, &cn->qnode)) {
queue_del(&cn->qnode);
queue_add(STATE_SYNC(tx_queue), &cn->qnode);