summaryrefslogtreecommitdiffstats
path: root/net/netfilter
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2015-10-27 13:20:25 +0100
committerLuis Henriques <luis.henriques@canonical.com>2015-12-13 17:49:41 +0000
commitc01bb4f0ba43eba5cdfc0a39aa381252f10e510e (patch)
tree9df1f0e98cc7a730ddb1d47c9dec68cbace1a400 /net/netfilter
parentc2187dc4bf34e529401d7e2654f6b77bca738dc4 (diff)
downloadlinux-stable-c01bb4f0ba43eba5cdfc0a39aa381252f10e510e.tar.gz
linux-stable-c01bb4f0ba43eba5cdfc0a39aa381252f10e510e.tar.bz2
linux-stable-c01bb4f0ba43eba5cdfc0a39aa381252f10e510e.zip
netfilter: nfnetlink: don't probe module if it exists
commit dbc3617f4c1f9fcbe63612048cb9583fea1e11ab upstream. 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> Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Diffstat (limited to 'net/netfilter')
-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 6ae88ace21cb..cddab2101569 100644
--- a/net/netfilter/nfnetlink.c
+++ b/net/netfilter/nfnetlink.c
@@ -406,7 +406,7 @@ static int nfnetlink_bind(int group)
int 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);