提交 71b2e5f5 编写于 作者: K Ken-ichirou MATSUZAWA 提交者: Pablo Neira Ayuso

netfilter: nfnetlink_queue: autoload nf_conntrack_netlink module NFQA_CFG_F_CONNTRACK config flag

This patch enables to load nf_conntrack_netlink module if
NFQA_CFG_F_CONNTRACK config flag is specified.
Signed-off-by: NKen-ichirou MATSUZAWA <chamas@h4.dion.ne.jp>
Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
上级 21c3c971
......@@ -1147,6 +1147,17 @@ static int nfqnl_recv_config(struct net *net, struct sock *ctnl,
if (flags & mask & NFQA_CFG_F_SECCTX)
return -EOPNOTSUPP;
#endif
if ((flags & mask & NFQA_CFG_F_CONNTRACK) &&
!rcu_access_pointer(nfnl_ct_hook)) {
#ifdef CONFIG_MODULES
nfnl_unlock(NFNL_SUBSYS_QUEUE);
request_module("ip_conntrack_netlink");
nfnl_lock(NFNL_SUBSYS_QUEUE);
if (rcu_access_pointer(nfnl_ct_hook))
return -EAGAIN;
#endif
return -EOPNOTSUPP;
}
}
rcu_read_lock();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册