aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter/nfnetlink.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2015-10-27 13:20:25 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2015-10-28 03:40:50 +0100
commitdbc3617f4c1f9fcbe63612048cb9583fea1e11ab (patch)
tree5078f798588f8f080d8d52495d036d9ce5a8aa71 /net/netfilter/nfnetlink.c
parentnetfilter: nf_nat_redirect: add missing NULL pointer check (diff)
downloadlinux-dev-dbc3617f4c1f9fcbe63612048cb9583fea1e11ab.tar.xz
linux-dev-dbc3617f4c1f9fcbe63612048cb9583fea1e11ab.zip
netfilter: nfnetlink: don't probe module if it exists
nfnetlink_bind request_module()s all the time as nfnetlink_get_subsys() shifts the argument by 8 to obtain the subsys id. So using type instead of type << 8 always returns NULL. Fixes: 03292745b02d11 ("netlink: add nlk->netlink_bind hook for module auto-loading") Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/nfnetlink.c')
-rw-r--r--net/netfilter/nfnetlink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/nfnetlink.c b/net/netfilter/nfnetlink.c
index 70277b11f742..27b93daee61f 100644
--- a/net/netfilter/nfnetlink.c
+++ b/net/netfilter/nfnetlink.c
@@ -492,7 +492,7 @@ static int nfnetlink_bind(struct net *net, int group)
type = nfnl_group2type[group];
rcu_read_lock();
- ss = nfnetlink_get_subsys(type);
+ ss = nfnetlink_get_subsys(type << 8);
rcu_read_unlock();
if (!ss)
request_module("nfnetlink-subsys-%d", type);