netfilter: nf_ct_helper: Fix helper unregister count.
helpers should unregister the only registered ports. but, helper cannot have correct registered ports value when failed to register. Signed-off-by: Taehee Yoo <ap420073@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
parent
dc3ee32e96
commit
b7a8daa9f3
|
@ -632,6 +632,7 @@ static int __init nf_conntrack_ftp_init(void)
|
|||
if (ret) {
|
||||
pr_err("failed to register helper for pf: %d port: %d\n",
|
||||
ftp[i][j].tuple.src.l3num, ports[i]);
|
||||
ports_c = i;
|
||||
nf_conntrack_ftp_fini();
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -271,6 +271,7 @@ static int __init nf_conntrack_irc_init(void)
|
|||
if (ret) {
|
||||
pr_err("failed to register helper for pf: %u port: %u\n",
|
||||
irc[i].tuple.src.l3num, ports[i]);
|
||||
ports_c = i;
|
||||
nf_conntrack_irc_fini();
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -223,6 +223,7 @@ static int __init nf_conntrack_sane_init(void)
|
|||
if (ret) {
|
||||
pr_err("failed to register helper for pf: %d port: %d\n",
|
||||
sane[i][j].tuple.src.l3num, ports[i]);
|
||||
ports_c = i;
|
||||
nf_conntrack_sane_fini();
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -1669,6 +1669,7 @@ static int __init nf_conntrack_sip_init(void)
|
|||
if (ret) {
|
||||
pr_err("failed to register helper for pf: %u port: %u\n",
|
||||
sip[i][j].tuple.src.l3num, ports[i]);
|
||||
ports_c = i;
|
||||
nf_conntrack_sip_fini();
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -142,6 +142,7 @@ static int __init nf_conntrack_tftp_init(void)
|
|||
if (ret) {
|
||||
pr_err("failed to register helper for pf: %u port: %u\n",
|
||||
tftp[i][j].tuple.src.l3num, ports[i]);
|
||||
ports_c = i;
|
||||
nf_conntrack_tftp_fini();
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue