Skip to contentSkip to conversation

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

PATCH Applied Florian Westphal 2 participants 2 messages Oct 27, 2015 – Oct 28, 2015

Subsystems (2)
lore
Share & tools
lore

Florian Westphal

author maintainer
#0 lore raw

PATCH 1/1 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")

---

net/netfilter/nfnetlink.c +1 -1
index 70277b1..27b93da 100644
@@ -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);
Signature · 1 line
2.0.5
maintainer Applied
#1 lore raw
Quoted 4 lines · Florian Westphal

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.

Applied, thanks Florian.