Skip to content

Commit

Permalink
netfilter: nfnetlink_log: autoload nf_conntrack_netlink module NFQA_C…
Browse files Browse the repository at this point in the history
…FG_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>
  • Loading branch information
Ken-ichirou MATSUZAWA authored and Pablo Neira Ayuso committed Oct 12, 2015
1 parent c932245 commit 914eebf
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion net/netfilter/nfnetlink_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,16 @@ nfulnl_recv_config(struct sock *ctnl, struct sk_buff *skb,
}

if (flags & NFULNL_CFG_F_CONNTRACK &&
rcu_access_pointer(nfnl_ct_hook) == NULL) {
!rcu_access_pointer(nfnl_ct_hook)) {
#ifdef CONFIG_MODULES
nfnl_unlock(NFNL_SUBSYS_ULOG);
request_module("ip_conntrack_netlink");
nfnl_lock(NFNL_SUBSYS_ULOG);
if (rcu_access_pointer(nfnl_ct_hook)) {
ret = -EAGAIN;
goto out;
}
#endif
ret = -EOPNOTSUPP;
goto out;
}
Expand Down

0 comments on commit 914eebf

Please sign in to comment.