mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-10-22 23:13:01 +02:00
netfilter: conntrack: helper: Replace -EEXIST by -EBUSY
[ Upstream commit 54416fd76770bd04fc3c501810e8d673550bab26 ]
The helper registration return value is passed-through by module_init
callbacks which modprobe confuses with the harmless -EEXIST returned
when trying to load an already loaded module.
Make sure modprobe fails so users notice their helper has not been
registered and won't work.
Suggested-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Fixes: 12f7a50533
("netfilter: add user-space connection tracking helper infrastructure")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
d00c8b0daf
commit
c79730e337
|
@ -418,7 +418,7 @@ int nf_conntrack_helper_register(struct nf_conntrack_helper *me)
|
|||
(cur->tuple.src.l3num == NFPROTO_UNSPEC ||
|
||||
cur->tuple.src.l3num == me->tuple.src.l3num) &&
|
||||
cur->tuple.dst.protonum == me->tuple.dst.protonum) {
|
||||
ret = -EEXIST;
|
||||
ret = -EBUSY;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
@ -429,7 +429,7 @@ int nf_conntrack_helper_register(struct nf_conntrack_helper *me)
|
|||
hlist_for_each_entry(cur, &nf_ct_helper_hash[h], hnode) {
|
||||
if (nf_ct_tuple_src_mask_cmp(&cur->tuple, &me->tuple,
|
||||
&mask)) {
|
||||
ret = -EEXIST;
|
||||
ret = -EBUSY;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user