diff options
author | Ken-ichirou MATSUZAWA <chamaken@gmail.com> | 2016-01-04 19:32:59 -0500 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-01-08 07:25:06 -0500 |
commit | 71b2e5f5ca3b163b90e487a96fd0cabbaf16792b (patch) | |
tree | b3f496b881059170320bf39d2ee3438f14586988 /net/netfilter | |
parent | 21c3c971d1eb5d5598ddb1eda2fc3e4d2c992182 (diff) |
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: Ken-ichirou MATSUZAWA <chamas@h4.dion.ne.jp>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter')
-rw-r--r-- | net/netfilter/nfnetlink_queue.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilter/nfnetlink_queue.c index c1f6df4cfe88..1d3936587ace 100644 --- a/net/netfilter/nfnetlink_queue.c +++ b/net/netfilter/nfnetlink_queue.c | |||
@@ -1147,6 +1147,17 @@ static int nfqnl_recv_config(struct net *net, struct sock *ctnl, | |||
1147 | if (flags & mask & NFQA_CFG_F_SECCTX) | 1147 | if (flags & mask & NFQA_CFG_F_SECCTX) |
1148 | return -EOPNOTSUPP; | 1148 | return -EOPNOTSUPP; |
1149 | #endif | 1149 | #endif |
1150 | if ((flags & mask & NFQA_CFG_F_CONNTRACK) && | ||
1151 | !rcu_access_pointer(nfnl_ct_hook)) { | ||
1152 | #ifdef CONFIG_MODULES | ||
1153 | nfnl_unlock(NFNL_SUBSYS_QUEUE); | ||
1154 | request_module("ip_conntrack_netlink"); | ||
1155 | nfnl_lock(NFNL_SUBSYS_QUEUE); | ||
1156 | if (rcu_access_pointer(nfnl_ct_hook)) | ||
1157 | return -EAGAIN; | ||
1158 | #endif | ||
1159 | return -EOPNOTSUPP; | ||
1160 | } | ||
1150 | } | 1161 | } |
1151 | 1162 | ||
1152 | rcu_read_lock(); | 1163 | rcu_read_lock(); |