mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-26 00:21:17 +00:00
netfilter: Remove useless param helper of nf_ct_helper_ext_add
The param helper of nf_ct_helper_ext_add is useless now, then remove it now. Signed-off-by: Gao Feng <gfree.wind@vip.163.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
parent
762c400766
commit
440534d3c5
7 changed files with 8 additions and 12 deletions
|
@ -103,9 +103,7 @@ int nf_conntrack_helpers_register(struct nf_conntrack_helper *, unsigned int);
|
||||||
void nf_conntrack_helpers_unregister(struct nf_conntrack_helper *,
|
void nf_conntrack_helpers_unregister(struct nf_conntrack_helper *,
|
||||||
unsigned int);
|
unsigned int);
|
||||||
|
|
||||||
struct nf_conn_help *nf_ct_helper_ext_add(struct nf_conn *ct,
|
struct nf_conn_help *nf_ct_helper_ext_add(struct nf_conn *ct, gfp_t gfp);
|
||||||
struct nf_conntrack_helper *helper,
|
|
||||||
gfp_t gfp);
|
|
||||||
|
|
||||||
int __nf_ct_try_assign_helper(struct nf_conn *ct, struct nf_conn *tmpl,
|
int __nf_ct_try_assign_helper(struct nf_conn *ct, struct nf_conn *tmpl,
|
||||||
gfp_t flags);
|
gfp_t flags);
|
||||||
|
|
|
@ -1401,8 +1401,7 @@ init_conntrack(struct net *net, struct nf_conn *tmpl,
|
||||||
/* exp->master safe, refcnt bumped in nf_ct_find_expectation */
|
/* exp->master safe, refcnt bumped in nf_ct_find_expectation */
|
||||||
ct->master = exp->master;
|
ct->master = exp->master;
|
||||||
if (exp->helper) {
|
if (exp->helper) {
|
||||||
help = nf_ct_helper_ext_add(ct, exp->helper,
|
help = nf_ct_helper_ext_add(ct, GFP_ATOMIC);
|
||||||
GFP_ATOMIC);
|
|
||||||
if (help)
|
if (help)
|
||||||
rcu_assign_pointer(help->helper, exp->helper);
|
rcu_assign_pointer(help->helper, exp->helper);
|
||||||
}
|
}
|
||||||
|
|
|
@ -192,8 +192,7 @@ void nf_conntrack_helper_put(struct nf_conntrack_helper *helper)
|
||||||
EXPORT_SYMBOL_GPL(nf_conntrack_helper_put);
|
EXPORT_SYMBOL_GPL(nf_conntrack_helper_put);
|
||||||
|
|
||||||
struct nf_conn_help *
|
struct nf_conn_help *
|
||||||
nf_ct_helper_ext_add(struct nf_conn *ct,
|
nf_ct_helper_ext_add(struct nf_conn *ct, gfp_t gfp)
|
||||||
struct nf_conntrack_helper *helper, gfp_t gfp)
|
|
||||||
{
|
{
|
||||||
struct nf_conn_help *help;
|
struct nf_conn_help *help;
|
||||||
|
|
||||||
|
@ -262,7 +261,7 @@ int __nf_ct_try_assign_helper(struct nf_conn *ct, struct nf_conn *tmpl,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (help == NULL) {
|
if (help == NULL) {
|
||||||
help = nf_ct_helper_ext_add(ct, helper, flags);
|
help = nf_ct_helper_ext_add(ct, flags);
|
||||||
if (help == NULL)
|
if (help == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1947,7 +1947,7 @@ ctnetlink_create_conntrack(struct net *net,
|
||||||
} else {
|
} else {
|
||||||
struct nf_conn_help *help;
|
struct nf_conn_help *help;
|
||||||
|
|
||||||
help = nf_ct_helper_ext_add(ct, helper, GFP_ATOMIC);
|
help = nf_ct_helper_ext_add(ct, GFP_ATOMIC);
|
||||||
if (help == NULL) {
|
if (help == NULL) {
|
||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
goto err2;
|
goto err2;
|
||||||
|
|
|
@ -870,7 +870,7 @@ static void nft_ct_helper_obj_eval(struct nft_object *obj,
|
||||||
if (test_bit(IPS_HELPER_BIT, &ct->status))
|
if (test_bit(IPS_HELPER_BIT, &ct->status))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
help = nf_ct_helper_ext_add(ct, to_assign, GFP_ATOMIC);
|
help = nf_ct_helper_ext_add(ct, GFP_ATOMIC);
|
||||||
if (help) {
|
if (help) {
|
||||||
rcu_assign_pointer(help->helper, to_assign);
|
rcu_assign_pointer(help->helper, to_assign);
|
||||||
set_bit(IPS_HELPER_BIT, &ct->status);
|
set_bit(IPS_HELPER_BIT, &ct->status);
|
||||||
|
|
|
@ -93,7 +93,7 @@ xt_ct_set_helper(struct nf_conn *ct, const char *helper_name,
|
||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
help = nf_ct_helper_ext_add(ct, helper, GFP_KERNEL);
|
help = nf_ct_helper_ext_add(ct, GFP_KERNEL);
|
||||||
if (help == NULL) {
|
if (help == NULL) {
|
||||||
nf_conntrack_helper_put(helper);
|
nf_conntrack_helper_put(helper);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
|
@ -1303,7 +1303,7 @@ static int ovs_ct_add_helper(struct ovs_conntrack_info *info, const char *name,
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
help = nf_ct_helper_ext_add(info->ct, helper, GFP_KERNEL);
|
help = nf_ct_helper_ext_add(info->ct, GFP_KERNEL);
|
||||||
if (!help) {
|
if (!help) {
|
||||||
nf_conntrack_helper_put(helper);
|
nf_conntrack_helper_put(helper);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue