Commit c01bb4f0 authored by Florian Westphal's avatar Florian Westphal Committed by Luis Henriques

netfilter: nfnetlink: don't probe module if it exists

commit dbc3617f 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: 03292745 ("netlink: add nlk->netlink_bind hook for module auto-loading")
Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent c2187dc4
...@@ -406,7 +406,7 @@ static int nfnetlink_bind(int group) ...@@ -406,7 +406,7 @@ static int nfnetlink_bind(int group)
int type = nfnl_group2type[group]; int type = nfnl_group2type[group];
rcu_read_lock(); rcu_read_lock();
ss = nfnetlink_get_subsys(type); ss = nfnetlink_get_subsys(type << 8);
rcu_read_unlock(); rcu_read_unlock();
if (!ss) if (!ss)
request_module("nfnetlink-subsys-%d", type); request_module("nfnetlink-subsys-%d", type);
......
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