Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4249fc1f authored by Sabrina Dubroca's avatar Sabrina Dubroca Committed by Pablo Neira Ayuso
Browse files

netfilter: ebtables: put module reference when an incorrect extension is found



commit bcf49342 ("netfilter: ebtables: Fix extension lookup with
identical name") added a second lookup in case the extension that was
found during the first lookup matched another extension with the same
name, but didn't release the reference on the incorrect module.

Fixes: bcf49342 ("netfilter: ebtables: Fix extension lookup with identical name")
Signed-off-by: default avatarSabrina Dubroca <sd@queasysnail.net>
Acked-by: default avatarPhil Sutter <phil@nwl.cc>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent 960fa72f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -368,6 +368,8 @@ ebt_check_match(struct ebt_entry_match *m, struct xt_mtchk_param *par,

	match = xt_find_match(NFPROTO_BRIDGE, m->u.name, 0);
	if (IS_ERR(match) || match->family != NFPROTO_BRIDGE) {
		if (!IS_ERR(match))
			module_put(match->me);
		request_module("ebt_%s", m->u.name);
		match = xt_find_match(NFPROTO_BRIDGE, m->u.name, 0);
	}