From: Patrick McHardy <kaber@trash.net>
To: Luciano Coelho <luciano.coelho@nokia.com>
Cc: netfilter-devel@vger.kernel.org, netdev@vger.kernel.org,
jengelh@medozas.de, Timo Teras <timo.teras@iki.fi>
Subject: Re: [PATCH v5] netfilter: Xtables: idletimer target implementation
Date: Tue, 15 Jun 2010 13:54:25 +0200 [thread overview]
Message-ID: <4C1769F1.40506@trash.net> (raw)
In-Reply-To: <1276593679-9576-1-git-send-email-luciano.coelho@nokia.com>
Two final comments:
Luciano Coelho wrote:
> diff --git a/include/linux/netfilter/xt_IDLETIMER.h b/include/linux/netfilter/xt_IDLETIMER.h
> new file mode 100644
> index 0000000..3e1aa1b
> --- /dev/null
> +++ b/include/linux/netfilter/xt_IDLETIMER.h
This file needs to be added to Kbuild to make sure it gets installed
during "make headers_install".
> +static void idletimer_tg_destroy(const struct xt_tgdtor_param *par)
> +{
> + const struct idletimer_tg_info *info = par->targinfo;
> +
> + pr_debug("destroy targinfo %s\n", info->label);
> +
> + mutex_lock(&list_mutex);
> + if (!info->timer) {
>
This doesn't seem to be possible.
> + mutex_unlock(&list_mutex);
> + return;
> + }
> +
> + if (--info->timer->refcnt == 0) {
> + pr_debug("deleting timer %s\n", info->label);
> +
> + list_del(&info->timer->entry);
> + del_timer_sync(&info->timer->timer);
> + sysfs_remove_file(idletimer_tg_kobj, &info->timer->attr.attr);
> + kfree(info->timer->attr.attr.name);
> + kfree(info->timer);
> + } else {
> + pr_debug("decreased refcnt of timer %s to %u\n",
> + info->label, info->timer->refcnt);
> + }
> +
> + mutex_unlock(&list_mutex);
> +}
next prev parent reply other threads:[~2010-06-15 11:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-15 9:21 [PATCH v5] netfilter: Xtables: idletimer target implementation Luciano Coelho
2010-06-15 11:54 ` Patrick McHardy [this message]
2010-06-15 12:34 ` Luciano Coelho
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C1769F1.40506@trash.net \
--to=kaber@trash.net \
--cc=jengelh@medozas.de \
--cc=luciano.coelho@nokia.com \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=timo.teras@iki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox