Skip to content

Commit 7614b00

Browse files
Phil Suttergregkh
authored andcommitted
netfilter: conntrack: helper: Replace -EEXIST by -EBUSY
[ Upstream commit 54416fd ] 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: 12f7a50 ("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>
1 parent c47ca77 commit 7614b00

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/netfilter/nf_conntrack_helper.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ int nf_conntrack_helper_register(struct nf_conntrack_helper *me)
368368
(cur->tuple.src.l3num == NFPROTO_UNSPEC ||
369369
cur->tuple.src.l3num == me->tuple.src.l3num) &&
370370
cur->tuple.dst.protonum == me->tuple.dst.protonum) {
371-
ret = -EEXIST;
371+
ret = -EBUSY;
372372
goto out;
373373
}
374374
}
@@ -379,7 +379,7 @@ int nf_conntrack_helper_register(struct nf_conntrack_helper *me)
379379
hlist_for_each_entry(cur, &nf_ct_helper_hash[h], hnode) {
380380
if (nf_ct_tuple_src_mask_cmp(&cur->tuple, &me->tuple,
381381
&mask)) {
382-
ret = -EEXIST;
382+
ret = -EBUSY;
383383
goto out;
384384
}
385385
}

0 commit comments

Comments
 (0)