diff options
author | Ken-ichirou MATSUZAWA <chamaken@gmail.com> | 2015-10-07 00:25:50 -0400 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2015-10-12 15:44:12 -0400 |
commit | 914eebf2f434c6c0355faa9d81b4ebdca94819c9 (patch) | |
tree | 811f23e8341ba8874ab11b588839c552af73f228 /net/netfilter | |
parent | c9322458119ecf2e5cf41dcb204aaf67238b2147 (diff) |
netfilter: nfnetlink_log: autoload nf_conntrack_netlink module NFQA_CFG_F_CONNTRACK config flag
This patch enables to load nf_conntrack_netlink module if
NFULNL_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_log.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c index e1d1187f6646..f8d9bd848f79 100644 --- a/net/netfilter/nfnetlink_log.c +++ b/net/netfilter/nfnetlink_log.c | |||
@@ -927,7 +927,16 @@ nfulnl_recv_config(struct sock *ctnl, struct sk_buff *skb, | |||
927 | } | 927 | } |
928 | 928 | ||
929 | if (flags & NFULNL_CFG_F_CONNTRACK && | 929 | if (flags & NFULNL_CFG_F_CONNTRACK && |
930 | rcu_access_pointer(nfnl_ct_hook) == NULL) { | 930 | !rcu_access_pointer(nfnl_ct_hook)) { |
931 | #ifdef CONFIG_MODULES | ||
932 | nfnl_unlock(NFNL_SUBSYS_ULOG); | ||
933 | request_module("ip_conntrack_netlink"); | ||
934 | nfnl_lock(NFNL_SUBSYS_ULOG); | ||
935 | if (rcu_access_pointer(nfnl_ct_hook)) { | ||
936 | ret = -EAGAIN; | ||
937 | goto out; | ||
938 | } | ||
939 | #endif | ||
931 | ret = -EOPNOTSUPP; | 940 | ret = -EOPNOTSUPP; |
932 | goto out; | 941 | goto out; |
933 | } | 942 | } |