aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2012-02-22 10:14:32 -0500
committerPablo Neira Ayuso <pablo@netfilter.org>2012-02-25 08:29:09 -0500
commite899b1119f1428f2b04dd7e9dba94864c33dd30b (patch)
treeca36d6bd86d78c97e146c1534d95168938a73792 /net
parentb072342e266bcac633a8412add1644a77968ce8a (diff)
netfilter: bridge: fix module autoload in compat case
We expected 0 if module doesn't exist, which is no longer the case (42046e2e45c109ba703993c510401a11f716c8df, netfilter: x_tables: return -ENOENT for non-existant matches/targets). Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net')
-rw-r--r--net/bridge/netfilter/ebtables.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c
index 5864cc491369..8aa4ad0e06af 100644
--- a/net/bridge/netfilter/ebtables.c
+++ b/net/bridge/netfilter/ebtables.c
@@ -1893,10 +1893,7 @@ static int compat_mtw_from_user(struct compat_ebt_entry_mwt *mwt,
1893 1893
1894 switch (compat_mwt) { 1894 switch (compat_mwt) {
1895 case EBT_COMPAT_MATCH: 1895 case EBT_COMPAT_MATCH:
1896 match = try_then_request_module(xt_find_match(NFPROTO_BRIDGE, 1896 match = xt_request_find_match(NFPROTO_BRIDGE, name, 0);
1897 name, 0), "ebt_%s", name);
1898 if (match == NULL)
1899 return -ENOENT;
1900 if (IS_ERR(match)) 1897 if (IS_ERR(match))
1901 return PTR_ERR(match); 1898 return PTR_ERR(match);
1902 1899
@@ -1915,10 +1912,7 @@ static int compat_mtw_from_user(struct compat_ebt_entry_mwt *mwt,
1915 break; 1912 break;
1916 case EBT_COMPAT_WATCHER: /* fallthrough */ 1913 case EBT_COMPAT_WATCHER: /* fallthrough */
1917 case EBT_COMPAT_TARGET: 1914 case EBT_COMPAT_TARGET:
1918 wt = try_then_request_module(xt_find_target(NFPROTO_BRIDGE, 1915 wt = xt_request_find_target(NFPROTO_BRIDGE, name, 0);
1919 name, 0), "ebt_%s", name);
1920 if (wt == NULL)
1921 return -ENOENT;
1922 if (IS_ERR(wt)) 1916 if (IS_ERR(wt))
1923 return PTR_ERR(wt); 1917 return PTR_ERR(wt);
1924 off = xt_compat_target_offset(wt); 1918 off = xt_compat_target_offset(wt);