Commit e899b111 authored by Florian Westphal's avatar Florian Westphal Committed by Pablo Neira Ayuso

netfilter: bridge: fix module autoload in compat case

We expected 0 if module doesn't exist, which is no longer the case
(42046e2e,
netfilter: x_tables: return -ENOENT for non-existant matches/targets).
Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent b072342e
...@@ -1893,10 +1893,7 @@ static int compat_mtw_from_user(struct compat_ebt_entry_mwt *mwt, ...@@ -1893,10 +1893,7 @@ static int compat_mtw_from_user(struct compat_ebt_entry_mwt *mwt,
switch (compat_mwt) { switch (compat_mwt) {
case EBT_COMPAT_MATCH: case EBT_COMPAT_MATCH:
match = try_then_request_module(xt_find_match(NFPROTO_BRIDGE, match = xt_request_find_match(NFPROTO_BRIDGE, name, 0);
name, 0), "ebt_%s", name);
if (match == NULL)
return -ENOENT;
if (IS_ERR(match)) if (IS_ERR(match))
return PTR_ERR(match); return PTR_ERR(match);
...@@ -1915,10 +1912,7 @@ static int compat_mtw_from_user(struct compat_ebt_entry_mwt *mwt, ...@@ -1915,10 +1912,7 @@ static int compat_mtw_from_user(struct compat_ebt_entry_mwt *mwt,
break; break;
case EBT_COMPAT_WATCHER: /* fallthrough */ case EBT_COMPAT_WATCHER: /* fallthrough */
case EBT_COMPAT_TARGET: case EBT_COMPAT_TARGET:
wt = try_then_request_module(xt_find_target(NFPROTO_BRIDGE, wt = xt_request_find_target(NFPROTO_BRIDGE, name, 0);
name, 0), "ebt_%s", name);
if (wt == NULL)
return -ENOENT;
if (IS_ERR(wt)) if (IS_ERR(wt))
return PTR_ERR(wt); return PTR_ERR(wt);
off = xt_compat_target_offset(wt); off = xt_compat_target_offset(wt);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment