From: Patrick McHardy <kaber@trash.net>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Netfilter Development Mailinglist <netfilter-devel@vger.kernel.org>
Subject: Re: [PATCH 4/7] Helper modules load on-demand support for ctnetlink
Date: Wed, 30 Jul 2008 13:10:51 +0200 [thread overview]
Message-ID: <48904C3B.7060004@trash.net> (raw)
In-Reply-To: <48904A9F.8010509@netfilter.org>
Pablo Neira Ayuso wrote:
> [PATCH] Helper modules load on-demand support for ctnetlink
>
> This patch adds helper load on-demand support for ctnetlink. This patch
> also refactorizes the code to provide a couple of functions to look up
> and set the connection tracking helper. The function removes the
> exported symbol __nf_ct_helper_find as it has not clients anymore.
>
> This patch uses the persistent helper aliasing defined in the previous
> patch.
>
> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
>
>
> Index: net-next-2.6.git/net/netfilter/nf_conntrack_netlink.c
> ===================================================================
> --- net-next-2.6.git.orig/net/netfilter/nf_conntrack_netlink.c 2008-07-30 08:50:04.000000000 +0200
> +++ net-next-2.6.git/net/netfilter/nf_conntrack_netlink.c 2008-07-30 09:00:05.000000000 +0200
> @@ -1120,8 +1120,6 @@ ctnetlink_create_conntrack(struct nlattr
> {
> struct nf_conn *ct;
> int err = -EINVAL;
> - struct nf_conn_help *help;
> - struct nf_conntrack_helper *helper;
>
> ct = nf_conntrack_alloc(otuple, rtuple, GFP_KERNEL);
> if (ct == NULL || IS_ERR(ct))
> @@ -1152,17 +1150,7 @@ ctnetlink_create_conntrack(struct nlattr
> #endif
>
> rcu_read_lock();
> - helper = __nf_ct_helper_find(rtuple);
> - if (helper) {
> - help = nf_ct_helper_ext_add(ct, GFP_KERNEL);
> - if (help == NULL) {
> - rcu_read_unlock();
> - err = -ENOMEM;
> - goto err;
> - }
> - /* not in hash table yet so not strictly necessary */
> - rcu_assign_pointer(help->helper, helper);
> - }
> + __nf_ct_set_helper(ct, GFP_KERNEL);
This one should be checking the return value.
next prev parent reply other threads:[~2008-07-30 11:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-30 11:03 [PATCH 4/7] Helper modules load on-demand support for ctnetlink Pablo Neira Ayuso
2008-07-30 11:10 ` Patrick McHardy [this message]
2008-07-30 11:29 ` Pablo Neira Ayuso
2008-07-30 11:33 ` Pablo Neira Ayuso
2008-07-30 13:35 ` Patrick McHardy
2008-07-31 8:36 ` Pablo Neira Ayuso
2008-07-31 8:46 ` Patrick McHardy
2008-07-31 9:44 ` Pablo Neira Ayuso
2008-07-31 17:51 ` Pablo Neira Ayuso
2008-07-31 21:27 ` Pablo Neira Ayuso
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=48904C3B.7060004@trash.net \
--to=kaber@trash.net \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
/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