netfilter: nfnetlink_log attach conntrack
Subsystems (2)
cover netfilter: nfnetlink_log attach conntrack
Hi,
It would be good if conntrack information is attached to nflog
netlink message since we can get NATed information from nflog. This patch series uses NFQUEUE basis in a hacky way, could it be acceptable?
Thanks,
Ken
PATCH 1/2 netfilter: nfnetlink_queue: enable to specify nla type
This patch updates nfqnl_ct_put() signature to put not only queue related attribute type.
--- include/net/netfilter/nfnetlink_queue.h | 8 +++++--- net/netfilter/nfnetlink_queue_core.c | 2 +- net/netfilter/nfnetlink_queue_ct.c | 9 +++++---- 3 files changed, 11 insertions(+), 8 deletions(-)
include/net/netfilter/nfnetlink_queue.h +5 -3
@@ -11,8 +11,9 @@ struct nf_conn *nfqnl_ct_get(struct sk_buff *entskb, size_t *size,struct nf_conn *nfqnl_ct_parse (const struct sk_buff *skb,const struct nlattr *attr,enum ip_conntrack_info *ctinfo); -int nfqnl_ct_put (struct sk_buff *skb,struct nf_conn *ct, -enum ip_conntrack_info ctinfo); +int nfqnl_ct_put (struct sk_buff *skb, +struct nf_conn *ct,int type, +enum ip_conntrack_info ctinfo,int info_type);void nfqnl_ct_seq_adjust (struct sk_buff *skb,struct nf_conn *ct,enum ip_conntrack_info ctinfo,int diff); int nfqnl_attach_expect(struct nf_conn *ct, const struct nlattr *attr,
@@ -32,7 +33,8 @@ inline struct nf_conn *nfqnl_ct_parse(const struct sk_buff *skb, }inline int -nfqnl_ct_put (struct sk_buff *skb,struct nf_conn *ct,enum ip_conntrack_info ctinfo) +nfqnl_ct_put (struct sk_buff *skb,struct nf_conn *ct,int type, +enum ip_conntrack_info ctinfo,int info_type) {return 0 ; }
net/netfilter/nfnetlink_queue_core.c +1 -1
@@ -507,7 +507,7 @@ nfqnl_build_packet_message(struct net *net, struct nfqnl_instance *queue,if (seclen &&nla_put (skb,NFQA_SECCTX , seclen, secdata)) goto nla_put_failure; -if (ct &&nfqnl_ct_put (skb, ct, ctinfo) <0 ) +if (ct &&nfqnl_ct_put (skb, ct,NFQA_CT , ctinfo,NFQA_CT_INFO ) <0 ) goto nla_put_failure; if (cap_len > data_len &&
net/netfilter/nfnetlink_queue_ct.c +5 -4
@@ -54,8 +54,9 @@ nfqnl_ct_parse(const struct sk_buff *skb, const struct nlattr *attr,return ct; } -int nfqnl_ct_put (struct sk_buff *skb,struct nf_conn *ct, -enum ip_conntrack_info ctinfo) +int nfqnl_ct_put (struct sk_buff *skb, +struct nf_conn *ct,int type, +enum ip_conntrack_info ctinfo,int info_type) {struct nfq_ct_hook *nfq_ct;struct nlattr *nest_parms;
@@ -65,7 +66,7 @@ int nfqnl_ct_put(struct sk_buff *skb, struct nf_conn *ct,if (nfq_ct ==NULL )return 0 ; - nest_parms =nla_nest_start (skb,NFQA_CT |NLA_F_NESTED ); + nest_parms =nla_nest_start (skb, type |NLA_F_NESTED );if (!nest_parms) goto nla_put_failure;
@@ -75,7 +76,7 @@ int nfqnl_ct_put(struct sk_buff *skb, struct nf_conn *ct,nla_nest_end (skb, nest_parms); tmp = ctinfo; -if (nla_put_be32 (skb,NFQA_CT_INFO ,htonl (tmp))) +if (nla_put_be32 (skb, info_type,htonl (tmp))) goto nla_put_failure;return 0 ;
Signature · 1 line
1.7.10.4
PATCH 2/2 netfilter: nfnetlink_log: allow to attach conntrack
In reply to Ken-ichirou MATSUZAWAThis patch enables to include the conntrack information together with the packet that is sent to user-space via NFLOG, then a user-space program can acquire NATed information by this NFULA_CT attribute.
Including the conntrack information is optional, you can set it via NFULNL_CFG_F_CONNTRACK flag with the NFULA_CFG_FLAGS attribute like NFQUEUE.
--- include/net/netfilter/nfnetlink_queue.h | 4 +- include/uapi/linux/netfilter/nfnetlink_log.h | 3 + net/netfilter/Kconfig | 9 +- net/netfilter/Makefile | 2 + net/netfilter/nfnetlink_log.c | 1123 ------------------------- net/netfilter/nfnetlink_log_core.c | 1135 ++++++++++++++++++++++++++ net/netfilter/nfnetlink_queue_ct.c | 2 +- 7 files changed, 1148 insertions(+), 1130 deletions(-) delete mode 100644 net/netfilter/nfnetlink_log.c create mode 100644 net/netfilter/nfnetlink_log_core.c
include/net/netfilter/nfnetlink_queue.h +2 -2
@@ -6,7 +6,7 @@struct nf_conn ;#ifdef CONFIG_NETFILTER_NETLINK_QUEUE_CT -struct nf_conn *nfqnl_ct_get (struct sk_buff *entskb,size_t *size, +struct nf_conn *nfqnl_ct_get (const struct sk_buff *entskb,size_t *size,enum ip_conntrack_info *ctinfo); struct nf_conn *nfqnl_ct_parse(const struct sk_buff *skb, const struct nlattr *attr,
@@ -20,7 +20,7 @@ int nfqnl_attach_expect(struct nf_conn *ct, const struct nlattr *attr, u32 portid, u32 report);#else inline struct nf_conn * -nfqnl_ct_get (struct sk_buff *entskb,size_t *size,enum ip_conntrack_info *ctinfo) +nfqnl_ct_get (const struct sk_buff *entskb,size_t *size,enum ip_conntrack_info *ctinfo) {return NULL ; }
include/uapi/linux/netfilter/nfnetlink_log.h +3 -0
@@ -51,6 +51,8 @@ enum nfulnl_attr_type {NFULA_HWTYPE ,/* hardware type */ NFULA_HWHEADER ,/* hardware header */ NFULA_HWLEN ,/* hardware header length */ +NFULA_CT ,/* nf_conntrack_netlink.h */ +NFULA_CT_INFO ,/* enum ip_conntrack_info */ __NFULA_MAX };
@@ -93,5 +95,6 @@ enum nfulnl_attr_config {#define NFULNL_CFG_F_SEQ 0x0001#define NFULNL_CFG_F_SEQ_GLOBAL 0x0002 +#define NFULNL_CFG_F_CONNTRACK 0x0004#endif /* _NFNETLINK_LOG_H */
net/netfilter/Kconfig +5 -4
@@ -363,12 +363,13 @@ config NF_CT_NETLINK_HELPER If unsure, say `N'. config NETFILTER_NETLINK_QUEUE_CT - bool "NFQUEUE integration with Connection Tracking" + bool "NFQUEUE/NFLOG integration with Connection Tracking" default n - depends on NETFILTER_NETLINK_QUEUE + depends on NETFILTER_NETLINK_QUEUE || NETFILTER_NETLINK_LOG help - If this option is enabled, NFQUEUE can include Connection Tracking - information together with the packet is the enqueued via NFNETLINK. + If this option is enabled, NFQUEUE and/or NFLOG can include + Connection Tracking information together with the packet is + enqueued, logged via NFNETLINK. config NF_NAT tristate
net/netfilter/Makefile +2 -0
@@ -13,6 +13,8 @@ obj-$(CONFIG_NETFILTER_NETLINK_ACCT) += nfnetlink_acct.o nfnetlink_queue-y := nfnetlink_queue_core.o nfnetlink_queue-$(CONFIG_NETFILTER_NETLINK_QUEUE_CT) += nfnetlink_queue_ct.o obj-$(CONFIG_NETFILTER_NETLINK_QUEUE) += nfnetlink_queue.o +nfnetlink_log-y := nfnetlink_log_core.o +nfnetlink_log-$(CONFIG_NETFILTER_NETLINK_QUEUE_CT) += nfnetlink_queue_ct.o obj-$(CONFIG_NETFILTER_NETLINK_LOG) += nfnetlink_log.o # connection tracking
net/netfilter/nfnetlink_log.c deleted +0 -1123
1,123 lines not on this page · raw message
net/netfilter/nfnetlink_log_core.c new file +1135 -0
1,135 lines not on this page · raw message
net/netfilter/nfnetlink_queue_ct.c +1 -1
@@ -14,7 +14,7 @@#include <net/netfilter/nf_conntrack.h> #include <net/netfilter/nfnetlink_queue.h> -struct nf_conn *nfqnl_ct_get (struct sk_buff *entskb,size_t *size, +struct nf_conn *nfqnl_ct_get (const struct sk_buff *entskb,size_t *size,enum ip_conntrack_info *ctinfo) {struct nfq_ct_hook *nfq_ct;
Signature · 1 line
1.7.10.4
Pablo Neira Ayuso
maintainerRe: [PATCH nf-next 2/2] netfilter: nfnetlink_log: allow to attach conntrack
Quoted 8 lines · Ken-ichirou MATSUZAWA
This patch enables to include the conntrack information together with the packet that is sent to user-space via NFLOG, then a user-space program can acquire NATed information by this
NFULA_CTattribute.Including the conntrack information is optional, you can set it via
NFULNL_CFG_F_CONNTRACKflag with theNFULA_CFG_FLAGSattribute like NFQUEUE.
No objections to this series, just several comments below on them.
Quoted 64 lines
Signed-off-by Ken-ichirou MATSUZAWA <[email protected]>--- include/net/netfilter/nfnetlink_queue.h | 4 +- include/uapi/linux/netfilter/nfnetlink_log.h | 3 + net/netfilter/Kconfig | 9 +- net/netfilter/Makefile | 2 + net/netfilter/nfnetlink_log.c | 1123 ------------------------- net/netfilter/nfnetlink_log_core.c | 1135 ++++++++++++++++++++++++++ net/netfilter/nfnetlink_queue_ct.c | 2 +- 7 files changed, 1148 insertions(+), 1130 deletions(-) delete mode 100644 net/netfilter/nfnetlink_log.c create mode 100644 net/netfilter/nfnetlink_log_core.cinclude/net/netfilter/nfnetlink_queue.h +2
-2@@ -6,7 +6,7 @@struct nf_conn ;#ifdef CONFIG_NETFILTER_NETLINK_QUEUE_CT -struct nf_conn *nfqnl_ct_get (struct sk_buff *entskb,size_t *size, +struct nf_conn *nfqnl_ct_get (const struct sk_buff *entskb,size_t *size,enum ip_conntrack_info *ctinfo); struct nf_conn *nfqnl_ct_parse(const struct sk_buff *skb, const struct nlattr *attr,@@ -20,7 +20,7 @@ int nfqnl_attach_expect(struct nf_conn *ct, const struct nlattr *attr, u32 portid, u32 report);#else inline struct nf_conn * -nfqnl_ct_get (struct sk_buff *entskb,size_t *size,enum ip_conntrack_info *ctinfo) +nfqnl_ct_get (const struct sk_buff *entskb,size_t *size,enum ip_conntrack_info *ctinfo) {return NULL ; }include/uapi/linux/netfilter/nfnetlink_log.h +3
-0@@ -51,6 +51,8 @@ enum nfulnl_attr_type {NFULA_HWTYPE ,/* hardware type */ NFULA_HWHEADER ,/* hardware header */ NFULA_HWLEN ,/* hardware header length */ +NFULA_CT ,/* nf_conntrack_netlink.h */ +NFULA_CT_INFO ,/* enum ip_conntrack_info */ __NFULA_MAX };@@ -93,5 +95,6 @@ enum nfulnl_attr_config {#define NFULNL_CFG_F_SEQ 0x0001#define NFULNL_CFG_F_SEQ_GLOBAL 0x0002 +#define NFULNL_CFG_F_CONNTRACK 0x0004#endif /* _NFNETLINK_LOG_H */ net/netfilter/Kconfig +0
-1@@ -363,12 +363,13 @@ config NF_CT_NETLINK_HELPER If unsure, say `N'. config NETFILTER_NETLINK_QUEUE_CT - bool "NFQUEUE integration with Connection Tracking"
net/netfilter/Kconfig config NF_CT_NETLINK_HELPER · line 372
Quoted 10 lines
net/netfilter/Kconfig +5
-3+ bool "NFQUEUE/NFLOG integration with Connection Tracking" default n - depends on NETFILTER_NETLINK_QUEUE + depends on NETFILTER_NETLINK_QUEUE || NETFILTER_NETLINK_LOG help - If this option is enabled, NFQUEUE can include Connection Tracking - information together with the packet is the enqueued via NFNETLINK. + If this option is enabled, NFQUEUE and/or NFLOG can include + Connection Tracking information together with the packet is + enqueued, logged via NFNETLINK.
You better add another Kconfig for _LOG.
net/netfilter/nfnetlink_log.c
Quoted 20 lines
net/netfilter/Kconfig +0
-0config NF_NAT tristatenet/netfilter/Makefile +2
-0@@ -13,6 +13,8 @@ obj-$(CONFIG_NETFILTER_NETLINK_ACCT) += nfnetlink_acct.o nfnetlink_queue-y := nfnetlink_queue_core.o nfnetlink_queue-$(CONFIG_NETFILTER_NETLINK_QUEUE_CT) += nfnetlink_queue_ct.o obj-$(CONFIG_NETFILTER_NETLINK_QUEUE) += nfnetlink_queue.o +nfnetlink_log-y := nfnetlink_log_core.o +nfnetlink_log-$(CONFIG_NETFILTER_NETLINK_QUEUE_CT) += nfnetlink_queue_ct.o obj-$(CONFIG_NETFILTER_NETLINK_LOG) += nfnetlink_log.o # connection trackingnet/netfilter/nfnetlink_log.c deleted +0
-0
Could you use -M option when generating patches?
-M[<n>], --find-renames[=<n>]
Detect renames. If n is specified, it is a threshold on the similarity index (i.e. amount of addition/deletions compared to the file’s size). For example, -M90% means git should consider a delete/add pair to be a rename if more than 90% of the file hasn’t changed.
It would be good if your first patch renamed the file, then you make the changes in a follow up patch.
The idea is to make it easier for people to review your changes.
Thanks.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH nf-next 2/2] netfilter: nfnetlink_log: allow to attach conntrack
Quoted 7 lines · Pablo Neira Ayuso
Quoted 5 lines · Ken-ichirou MATSUZAWA
This patch enables to include the conntrack information together with the packet that is sent to user-space via NFLOG, then a user-space program can acquire NATed information by this
NFULA_CTattribute.No objections to this series, just several comments below on them.
Thank you for your taking time. But I realize these can not be statically built into kernel, sorry.
Quoted 6 lines
Quoted 6 lines
config
NETFILTER_NETLINK_QUEUE_CTnet/netfilter/Kconfig +2
-2- bool "NFQUEUE integration with Connection Tracking" + bool "NFQUEUE/NFLOG integration with Connection Tracking" default n - depends on NETFILTER_NETLINK_QUEUE + depends on NETFILTER_NETLINK_QUEUE || NETFILTER_NETLINK_LOG
Quoted 8 lines
net/netfilter/Kconfig config NF_CT_NETLINK_HELPER · line 372
Quoted 6 lines
net/netfilter/Kconfig +3
-2help - If this option is enabled, NFQUEUE can include Connection Tracking - information together with the packet is the enqueued via NFNETLINK. + If this option is enabled, NFQUEUE and/or NFLOG can include + Connection Tracking information together with the packet is + enqueued, logged via NFNETLINK.You better add another
Kconfigfor_LOG.
I'll follow your instruction, thanks.
I have to reconsider to enable it statically linked and will be glad if you review again at the next time.
Thanks,
Re: [PATCH nf-next 2/2] netfilter: nfnetlink_log: allow to attach conntrack
In reply to Pablo Neira AyusoThe compile fails if both nflog and nfqueue are built-in at the previous patch.
I am trying to link nf_netlink_queue_ct to nf_conntrack_netlink, not to nf_netlink_queue_core, to avoid the compilation fail in the following patch series. The idea is that nfqueue and nflog uses the functions in nf_conntrack_netlink.o, put the conntrack attachment basis into nf_conntrack_netlink.
Quoted 15 lines · Pablo Neira Ayuso
net/netfilter/Kconfig config NF_CT_NETLINK_HELPER · line 372
Quoted 12 lines · Ken-ichirou MATSUZAWA
config
NETFILTER_NETLINK_QUEUE_CTnet/netfilter/Kconfig +5
-4- bool "NFQUEUE integration with Connection Tracking" + bool "NFQUEUE/NFLOG integration with Connection Tracking" default n - depends on NETFILTER_NETLINK_QUEUE + depends on NETFILTER_NETLINK_QUEUE || NETFILTER_NETLINK_LOG help - If this option is enabled, NFQUEUE can include Connection Tracking - information together with the packet is the enqueued via NFNETLINK. + If this option is enabled, NFQUEUE and/or NFLOG can include + Connection Tracking information together with the packet is + enqueued, logged via NFNETLINK.You better add another
Kconfigfor_LOG.
That idea causes to expose functions in nf_netlink_queue_ct and to disable to separate config in Kconfig too. Should I separate those config? and would you please tell me how if I should?
Thanks,
PATCH v2 1/5 netfilter: nfnetlink_queue: enable to specify nla type
This patch updates nfqnl_ct_put() signature to put not only queue related attributes.
--- include/net/netfilter/nfnetlink_queue.h | 8 +++++--- net/netfilter/nfnetlink_queue_core.c | 2 +- net/netfilter/nfnetlink_queue_ct.c | 9 +++++---- 3 files changed, 11 insertions(+), 8 deletions(-)
include/net/netfilter/nfnetlink_queue.h +5 -3
@@ -11,8 +11,9 @@ struct nf_conn *nfqnl_ct_get(struct sk_buff *entskb, size_t *size,struct nf_conn *nfqnl_ct_parse (const struct sk_buff *skb,const struct nlattr *attr,enum ip_conntrack_info *ctinfo); -int nfqnl_ct_put (struct sk_buff *skb,struct nf_conn *ct, -enum ip_conntrack_info ctinfo); +int nfqnl_ct_put (struct sk_buff *skb, +struct nf_conn *ct,int type, +enum ip_conntrack_info ctinfo,int info_type);void nfqnl_ct_seq_adjust (struct sk_buff *skb,struct nf_conn *ct,enum ip_conntrack_info ctinfo,int diff); int nfqnl_attach_expect(struct nf_conn *ct, const struct nlattr *attr,
@@ -32,7 +33,8 @@ inline struct nf_conn *nfqnl_ct_parse(const struct sk_buff *skb, }inline int -nfqnl_ct_put (struct sk_buff *skb,struct nf_conn *ct,enum ip_conntrack_info ctinfo) +nfqnl_ct_put (struct sk_buff *skb,struct nf_conn *ct,int type, +enum ip_conntrack_info ctinfo,int info_type) {return 0 ; }
net/netfilter/nfnetlink_queue_core.c +1 -1
@@ -507,7 +507,7 @@ nfqnl_build_packet_message(struct net *net, struct nfqnl_instance *queue,if (seclen &&nla_put (skb,NFQA_SECCTX , seclen, secdata)) goto nla_put_failure; -if (ct &&nfqnl_ct_put (skb, ct, ctinfo) <0 ) +if (ct &&nfqnl_ct_put (skb, ct,NFQA_CT , ctinfo,NFQA_CT_INFO ) <0 ) goto nla_put_failure; if (cap_len > data_len &&
net/netfilter/nfnetlink_queue_ct.c +5 -4
@@ -54,8 +54,9 @@ nfqnl_ct_parse(const struct sk_buff *skb, const struct nlattr *attr,return ct; } -int nfqnl_ct_put (struct sk_buff *skb,struct nf_conn *ct, -enum ip_conntrack_info ctinfo) +int nfqnl_ct_put (struct sk_buff *skb, +struct nf_conn *ct,int type, +enum ip_conntrack_info ctinfo,int info_type) {struct nfq_ct_hook *nfq_ct;struct nlattr *nest_parms;
@@ -65,7 +66,7 @@ int nfqnl_ct_put(struct sk_buff *skb, struct nf_conn *ct,if (nfq_ct ==NULL )return 0 ; - nest_parms =nla_nest_start (skb,NFQA_CT |NLA_F_NESTED ); + nest_parms =nla_nest_start (skb, type |NLA_F_NESTED );if (!nest_parms) goto nla_put_failure;
@@ -75,7 +76,7 @@ int nfqnl_ct_put(struct sk_buff *skb, struct nf_conn *ct,nla_nest_end (skb, nest_parms); tmp = ctinfo; -if (nla_put_be32 (skb,NFQA_CT_INFO ,htonl (tmp))) +if (nla_put_be32 (skb, info_type,htonl (tmp))) goto nla_put_failure;return 0 ;
Signature · 1 line
1.7.10.4
PATCH v2 2/5 netfilter: nf_conntrack_netlink: rename to link ct attachment with
In reply to Ken-ichirou MATSUZAWAThis patch is the first pharse of which linking conntrack attach code with nf_conntrack_netlink. The plan is intended to attach a conntrack to nflog, based on what nfqueue has already done.
---
net/netfilter/Makefile | 1 +
net/netfilter/{nf_conntrack_netlink.c => nf_conntrack_netlink_core.c} | 0
2 files changed, 1 insertion(+)
rename net/netfilter/{nf_conntrack_netlink.c => nf_conntrack_netlink_core.c} (100%)net/netfilter/Makefile +1 -0
@@ -25,6 +25,7 @@ obj-$(CONFIG_NF_CT_PROTO_SCTP) += nf_conntrack_proto_sctp.o obj-$(CONFIG_NF_CT_PROTO_UDPLITE) += nf_conntrack_proto_udplite.o # netlink interface for nf_conntrack +nf_conntrack_netlink-y := nf_conntrack_netlink_core.o obj-$(CONFIG_NF_CT_NETLINK) += nf_conntrack_netlink.o obj-$(CONFIG_NF_CT_NETLINK_TIMEOUT) += nfnetlink_cttimeout.o obj-$(CONFIG_NF_CT_NETLINK_HELPER) += nfnetlink_cthelper.o
net/netfilter/nf_conntrack_netlink_core.c renamed from net/netfilter/nf_conntrack_netlink.c +0 -0
Signature · 1 line
1.7.10.4
PATCH v2 3/5 netfilter: nfnetlink_queue_ct: export functions
In reply to Ken-ichirou MATSUZAWAThis patch exports functions in nfnetlink_queue_ct to use not only from nfqueue, and move nfnetlink_queue_ct, conntrack attachement basis, to nf_conntrack_netlink from nfnetlink_queue_core.
--- include/linux/netfilter.h | 1 - net/netfilter/Makefile | 2 +- net/netfilter/core.c | 3 --- net/netfilter/nf_conntrack_netlink_core.c | 3 +++ net/netfilter/nfnetlink_queue_ct.c | 7 +++++++ 5 files changed, 11 insertions(+), 5 deletions(-)
include/linux/netfilter.h +0 -1
@@ -385,7 +385,6 @@ struct nfq_ct_hook {void (*seq_adjust)(struct sk_buff *skb,struct nf_conn *ct, enum ip_conntrack_info ctinfo, s32 off); }; -extern struct nfq_ct_hook __rcu *nfq_ct_hook;#else static inline void nf_ct_attach (struct sk_buff *new,struct sk_buff *skb) {}#endif
net/netfilter/Makefile +1 -1
@@ -11,7 +11,6 @@ obj-$(CONFIG_NETFILTER) = netfilter.o obj-$(CONFIG_NETFILTER_NETLINK) += nfnetlink.o obj-$(CONFIG_NETFILTER_NETLINK_ACCT) += nfnetlink_acct.o nfnetlink_queue-y := nfnetlink_queue_core.o -nfnetlink_queue-$(CONFIG_NETFILTER_NETLINK_QUEUE_CT) += nfnetlink_queue_ct.o obj-$(CONFIG_NETFILTER_NETLINK_QUEUE) += nfnetlink_queue.o obj-$(CONFIG_NETFILTER_NETLINK_LOG) += nfnetlink_log.o
@@ -26,6 +25,7 @@ obj-$(CONFIG_NF_CT_PROTO_UDPLITE) += nf_conntrack_proto_udplite.o # netlink interface for nf_conntrack nf_conntrack_netlink-y := nf_conntrack_netlink_core.o +nf_conntrack_netlink-$(CONFIG_NETFILTER_NETLINK_QUEUE_CT) += nfnetlink_queue_ct.o obj-$(CONFIG_NF_CT_NETLINK) += nf_conntrack_netlink.o obj-$(CONFIG_NF_CT_NETLINK_TIMEOUT) += nfnetlink_cttimeout.o obj-$(CONFIG_NF_CT_NETLINK_HELPER) += nfnetlink_cthelper.o
net/netfilter/core.c +0 -3
@@ -385,9 +385,6 @@ void nf_conntrack_destroy(struct nf_conntrack *nfct) }EXPORT_SYMBOL (nf_conntrack_destroy); -struct nfq_ct_hook __rcu *nfq_ct_hook__read_mostly ; -EXPORT_SYMBOL_GPL (nfq_ct_hook); -#endif /* CONFIG_NF_CONNTRACK */ #ifdef CONFIG_NF_NAT_NEEDED
net/netfilter/nf_conntrack_netlink_core.c +3 -0
@@ -2134,6 +2134,9 @@ ctnetlink_alloc_expect(const struct nlattr *const cda[], struct nf_conn *ct, struct nf_conntrack_tuple *mask);#ifdef CONFIG_NETFILTER_NETLINK_QUEUE_CT + +extern struct nfq_ct_hook __rcu *nfq_ct_hook__read_mostly ; +static size_t ctnetlink_nfqueue_build_size (const struct nf_conn *ct) {
net/netfilter/nfnetlink_queue_ct.c +7 -0
@@ -14,6 +14,8 @@#include <net/netfilter/nf_conntrack.h> #include <net/netfilter/nfnetlink_queue.h> +struct nfq_ct_hook __rcu *nfq_ct_hook__read_mostly ; +struct nf_conn *nfqnl_ct_get (struct sk_buff *entskb,size_t *size,enum ip_conntrack_info *ctinfo) {
@@ -34,6 +36,7 @@ struct nf_conn *nfqnl_ct_get(struct sk_buff *entskb, size_t *size, }return ct; } +EXPORT_SYMBOL_GPL (nfqnl_ct_get);struct nf_conn * nfqnl_ct_parse(const struct sk_buff *skb, const struct nlattr *attr,
@@ -53,6 +56,7 @@ nfqnl_ct_parse(const struct sk_buff *skb, const struct nlattr *attr,return ct; } +EXPORT_SYMBOL_GPL (nfqnl_ct_parse); int nfqnl_ct_put(struct sk_buff *skb, struct nf_conn *ct, int type,
@@ -84,6 +88,7 @@ int nfqnl_ct_put(struct sk_buff *skb, nla_put_failure:return -1 ; } +EXPORT_SYMBOL_GPL (nfqnl_ct_put);void nfqnl_ct_seq_adjust (struct sk_buff *skb,struct nf_conn *ct,enum ip_conntrack_info ctinfo,int diff)
@@ -97,6 +102,7 @@ void nfqnl_ct_seq_adjust(struct sk_buff *skb, struct nf_conn *ct,if ((ct->status &IPS_NAT_MASK ) && diff) nfq_ct->seq_adjust (skb, ct, ctinfo, diff); } +EXPORT_SYMBOL_GPL (nfqnl_ct_seq_adjust);int nfqnl_attach_expect (struct nf_conn *ct,const struct nlattr *attr,u32 portid,u32 report)
@@ -112,3 +118,4 @@ int nfqnl_attach_expect(struct nf_conn *ct, const struct nlattr *attr,return nfq_ct->attach_expect (attr, ct, portid, report); } +EXPORT_SYMBOL_GPL (nfqnl_attach_expect);
Signature · 1 line
1.7.10.4
PATCH v2 4/5 netfilter: nfnetlink_queue: rename nfnetlink_queue_core.c
In reply to Ken-ichirou MATSUZAWANow conntrack attaching code belongs to nf_conntrack_core, nfnetlink_queue_core can be renamed to old one.
---
net/netfilter/Makefile | 1 -
net/netfilter/{nfnetlink_queue_core.c => nfnetlink_queue.c} | 0
2 files changed, 1 deletion(-)
rename net/netfilter/{nfnetlink_queue_core.c => nfnetlink_queue.c} (100%)net/netfilter/Makefile +0 -1
@@ -10,7 +10,6 @@ obj-$(CONFIG_NETFILTER) = netfilter.o obj-$(CONFIG_NETFILTER_NETLINK) += nfnetlink.o obj-$(CONFIG_NETFILTER_NETLINK_ACCT) += nfnetlink_acct.o -nfnetlink_queue-y := nfnetlink_queue_core.o obj-$(CONFIG_NETFILTER_NETLINK_QUEUE) += nfnetlink_queue.o obj-$(CONFIG_NETFILTER_NETLINK_LOG) += nfnetlink_log.o
net/netfilter/nfnetlink_queue.c renamed from net/netfilter/nfnetlink_queue_core.c +0 -0
Signature · 1 line
1.7.10.4
PATCH v2 5/5 netfilter: nfnetlink_log: allow to attach conntrack
In reply to Ken-ichirou MATSUZAWAThis patch enables to include the conntrack information together with the packet that is sent to user-space via NFLOG, then a user-space program can acquire NATed information by this NFULA_CT attribute.
Including the conntrack information is optional, you can set it via NFULNL_CFG_F_CONNTRACK flag with the NFULA_CFG_FLAGS attribute like NFQUEUE.
--- include/net/netfilter/nfnetlink_queue.h | 4 ++-- include/uapi/linux/netfilter/nfnetlink_log.h | 3 +++ net/netfilter/Kconfig | 12 +++++++----- net/netfilter/nfnetlink_log.c | 18 +++++++++++++++--- net/netfilter/nfnetlink_queue_ct.c | 2 +- 5 files changed, 28 insertions(+), 11 deletions(-)
include/net/netfilter/nfnetlink_queue.h +2 -2
@@ -6,7 +6,7 @@struct nf_conn ;#ifdef CONFIG_NETFILTER_NETLINK_QUEUE_CT -struct nf_conn *nfqnl_ct_get (struct sk_buff *entskb,size_t *size, +struct nf_conn *nfqnl_ct_get (const struct sk_buff *entskb,size_t *size,enum ip_conntrack_info *ctinfo); struct nf_conn *nfqnl_ct_parse(const struct sk_buff *skb, const struct nlattr *attr,
@@ -20,7 +20,7 @@ int nfqnl_attach_expect(struct nf_conn *ct, const struct nlattr *attr, u32 portid, u32 report);#else inline struct nf_conn * -nfqnl_ct_get (struct sk_buff *entskb,size_t *size,enum ip_conntrack_info *ctinfo) +nfqnl_ct_get (const struct sk_buff *entskb,size_t *size,enum ip_conntrack_info *ctinfo) {return NULL ; }
include/uapi/linux/netfilter/nfnetlink_log.h +3 -0
@@ -51,6 +51,8 @@ enum nfulnl_attr_type {NFULA_HWTYPE ,/* hardware type */ NFULA_HWHEADER ,/* hardware header */ NFULA_HWLEN ,/* hardware header length */ +NFULA_CT ,/* nf_conntrack_netlink.h */ +NFULA_CT_INFO ,/* enum ip_conntrack_info */ __NFULA_MAX };
@@ -93,5 +95,6 @@ enum nfulnl_attr_config {#define NFULNL_CFG_F_SEQ 0x0001#define NFULNL_CFG_F_SEQ_GLOBAL 0x0002 +#define NFULNL_CFG_F_CONNTRACK 0x0004#endif /* _NFNETLINK_LOG_H */
net/netfilter/Kconfig +7 -5
@@ -363,12 +363,14 @@ config NF_CT_NETLINK_HELPER If unsure, say `N'. config NETFILTER_NETLINK_QUEUE_CT - bool "NFQUEUE integration with Connection Tracking" - default n - depends on NETFILTER_NETLINK_QUEUE + bool "NFQUEUE/NFLOG integration with Connection Tracking" + default n + depends on NF_CT_NETLINK + depends on NETFILTER_NETLINK_QUEUE || NETFILTER_NETLINK_LOG help - If this option is enabled, NFQUEUE can include Connection Tracking - information together with the packet is the enqueued via NFNETLINK. + If this option is enabled, NFQUEUE and NFLOG can include + Connection Tracking information together with the packet is + the enqueued via NFNETLINK. config NF_NAT tristate
net/netfilter/nfnetlink_log.c +15 -3
@@ -37,6 +37,7 @@#include <net/netfilter/nf_log.h> #include <net/netns/generic.h> #include <net/netfilter/nfnetlink_log.h> +#include <net/netfilter/nfnetlink_queue.h> #include <linux/atomic.h>
@@ -401,7 +402,8 @@ __build_packet_message(struct nfnl_log_net *log,unsigned int hooknum, const struct net_device *indev, const struct net_device *outdev, - const char *prefix, unsigned int plen) + const char *prefix, unsigned int plen, + struct nf_conn *ct, enum ip_conntrack_info ctinfo) { struct nfulnl_msg_packet_hdr pmsg;struct nlmsghdr *nlh;
@@ -575,6 +577,11 @@ __build_packet_message(struct nfnl_log_net *log, htonl(atomic_inc_return(&log->global_seq)))) goto nla_put_failure; +/* conntrack */ +if (ct &&nfqnl_ct_put (inst->skb, ct,NFULA_CT , + ctinfo,NFULA_CT_INFO ) <0 ) + goto nla_put_failure; +if (data_len) {struct nlattr *nla;int size =nla_attr_size (data_len);
@@ -620,12 +627,15 @@ nfulnl_log_packet(struct net *net,const struct nf_loginfo *li_user, const char *prefix) { - unsigned int size, data_len; + size_t size; +unsigned int data_len;struct nfulnl_instance *inst;const struct nf_loginfo *li;unsigned int qthreshold;unsigned int plen;struct nfnl_log_net *log =nfnl_log_pernet (net); +struct nf_conn *ct =NULL ; +enum ip_conntrack_info uninitialized_var (ctinfo );if (li_user && li_user->type ==NF_LOG_TYPE_ULOG ) li = li_user;
@@ -671,6 +681,8 @@ nfulnl_log_packet(struct net *net, size +=nla_total_size (sizeof (u_int32_t));if (inst->flags &NFULNL_CFG_F_SEQ_GLOBAL ) size +=nla_total_size (sizeof (u_int32_t)); +if (inst->flags &NFULNL_CFG_F_CONNTRACK ) + ct =nfqnl_ct_get (skb, &size, &ctinfo); qthreshold = inst->qthreshold;/* per-rule qthreshold overrides per-instance */
@@ -715,7 +727,7 @@ nfulnl_log_packet(struct net *net, inst->qlen++;__build_packet_message (log, inst, skb, data_len, pf, - hooknum, in, out, prefix, plen); + hooknum, in, out, prefix, plen, ct, ctinfo);if (inst->qlen >= qthreshold)__nfulnl_flush (inst);
net/netfilter/nfnetlink_queue_ct.c +1 -1
@@ -16,7 +16,7 @@struct nfq_ct_hook __rcu *nfq_ct_hook__read_mostly ; -struct nf_conn *nfqnl_ct_get (struct sk_buff *entskb,size_t *size, +struct nf_conn *nfqnl_ct_get (const struct sk_buff *entskb,size_t *size,enum ip_conntrack_info *ctinfo) {struct nfq_ct_hook *nfq_ct;
Signature · 1 line
1.7.10.4
Pablo Neira Ayuso
maintainerRe: [PATCHv2 nf-next 3/5] netfilter: nfnetlink_queue_ct: export functions
In reply to Ken-ichirou MATSUZAWAOn Tue, Sep 01, 2015 at 09:41:46AM +0900, Ken-ichirou MATSUZAWA wrote:
[...]
Quoted 14 lines
net/netfilter/nfnetlink_queue_ct.c +2
-0@@ -14,6 +14,8 @@#include <net/netfilter/nf_conntrack.h> #include <net/netfilter/nfnetlink_queue.h> +struct nfq_ct_hook __rcu *nfq_ct_hook__read_mostly ; +struct nf_conn *nfqnl_ct_get (struct sk_buff *entskb,size_t *size,enum ip_conntrack_info *ctinfo) {
net/netfilter/nfnetlink_queue_ct.c struct nf_conn *nfqnl_ct_get(struct sk_buff *entskb, size_t *size, · line 39
Quoted 4 lines
net/netfilter/nfnetlink_queue_ct.c +1
-0@@ -34,6 +36,7 @@ struct nf_conn *nfqnl_ct_get(struct sk_buff *entskb, size_t *size, }return ct; } +EXPORT_SYMBOL_GPL (nfqnl_ct_get);
After this patchset these functions are not nfqueue specific anymore, so we have to place this in a single module, eg. nfnetlink_ct_glue.c (unless someone comes up with a better name...).
The idea is that nfnetlink_queue and nfnetlink_log request this module to be loaded when the CONNTRACK flag is passed.
The nfqnl_ prefix should be also modified, I'd suggest you use nfnl_ct_
Does this sound good to you?
Re: [PATCHv2 nf-next 3/5] netfilter: nfnetlink_queue_ct: export functions
Hi,
Quoted 2 lines · Pablo Neira Ayuso
The idea is that
nfnetlink_queueandnfnetlink_logrequest this module to be loaded when the CONNTRACK flag is passed.
I tried to modularize nfnetlink_queue_ct first, please see a patch attached. It can be compiled with NETFILTER_NETLINK_QUEUE=m and any of NETFILTER_NETLINK_QUEUE_CT, but in a case of QUEUE=y, QUEUE_CT can not be a module.
Can we enforce QUEUE_CT not to be 'm', in case of QUEUE=y by updating Kconfig? Would you please give me some advice?
Thanks,
Quoted 1 line
From
e2bc33e98b8626c475482c11106e56d15bcf2268Mon Sep 17 00:00:00 2001
From: Ken-ichirou MATSUZAWA <[email protected]>
Date: Mon, 7 Sep 2015 09:44:30 +0900
Subject: [PATCH 1/5] netfilter: nfnetlink_queue: modularize nfnetlink_queue_ct
The aim of this patch is eventually to include the conntrack information together with not only nfqueue but also nflog. The first thing to do so is modularize nfnetlink_queue_ct.
--- include/linux/netfilter.h | 11 ----------- include/net/netfilter/nf_conntrack.h | 10 ++++++++++ include/net/netfilter/nfnetlink_queue.h | 4 ++-- net/netfilter/Kconfig | 7 ++++--- net/netfilter/Makefile | 2 +- net/netfilter/core.c | 4 ---- net/netfilter/nf_conntrack_netlink.c | 12 +++--------- net/netfilter/nfnetlink_queue_core.c | 6 ++++++ net/netfilter/nfnetlink_queue_ct.c | 29 +++++++++++++++++++++++++++++ 9 files changed, 55 insertions(+), 30 deletions(-)
include/linux/netfilter.h +0 -11
@@ -375,17 +375,6 @@ extern void (*nf_ct_destroy)(struct nf_conntrack *) __rcu;struct nf_conn ;enum ip_conntrack_info ;struct nlattr ; - -struct nfq_ct_hook { -size_t (*build_size)(const struct nf_conn *ct); -int (*build)(struct sk_buff *skb,struct nf_conn *ct); -int (*parse)(const struct nlattr *attr,struct nf_conn *ct); -int (*attach_expect)(const struct nlattr *attr,struct nf_conn *ct, -u32 portid,u32 report); -void (*seq_adjust)(struct sk_buff *skb,struct nf_conn *ct, -enum ip_conntrack_info ctinfo,s32 off); -}; -extern struct nfq_ct_hook __rcu *nfq_ct_hook;#else static inline void nf_ct_attach (struct sk_buff *new,struct sk_buff *skb) {}#endif
include/net/netfilter/nf_conntrack.h +10 -0
@@ -305,4 +305,14 @@ struct nf_conn *nf_ct_tmpl_alloc(struct net *net,#define MODULE_ALIAS_NFCT_HELPER (helper) \ MODULE_ALIAS("nfct-helper-" helper) +struct nfq_ct_hook { +size_t (*build_size)(const struct nf_conn *ct); +int (*build)(struct sk_buff *skb,struct nf_conn *ct); +int (*parse)(const struct nlattr *attr,struct nf_conn *ct); +int (*attach_expect)(const struct nlattr *attr,struct nf_conn *ct, +u32 portid,u32 report); +void (*seq_adjust)(struct sk_buff *skb,struct nf_conn *ct, +enum ip_conntrack_info ctinfo,s32 off); +}; +#endif /* _NF_CONNTRACK_H */
include/net/netfilter/nfnetlink_queue.h +2 -2
@@ -5,7 +5,7 @@struct nf_conn ; -#ifdef CONFIG_NETFILTER_NETLINK_QUEUE_CT +#if IS_ENABLED (CONFIG_NETFILTER_NETLINK_QUEUE_CT )struct nf_conn *nfqnl_ct_get (struct sk_buff *entskb,size_t *size,enum ip_conntrack_info *ctinfo); struct nf_conn *nfqnl_ct_parse(const struct sk_buff *skb,
@@ -47,5 +47,5 @@ inline int nfqnl_attach_expect(struct nf_conn *ct, const struct nlattr *attr, {return 0 ; } -#endif /* NF_CONNTRACK */ +#endif /* CONFIG_NETFILTER_NETLINK_QUEUE_CT */ #endif
net/netfilter/Kconfig +4 -3
@@ -363,9 +363,10 @@ config NF_CT_NETLINK_HELPER If unsure, say `N'. config NETFILTER_NETLINK_QUEUE_CT - bool "NFQUEUE integration with Connection Tracking" - default n - depends on NETFILTER_NETLINK_QUEUE + tristate "NFQUEUE integration with Connection Tracking" + default n + depends on NF_CT_NETLINK + depends on NETFILTER_NETLINK_QUEUE help If this option is enabled, NFQUEUE can include Connection Tracking information together with the packet is the enqueued via NFNETLINK.
net/netfilter/Makefile +1 -1
@@ -11,9 +11,9 @@ obj-$(CONFIG_NETFILTER) = netfilter.o obj-$(CONFIG_NETFILTER_NETLINK) += nfnetlink.o obj-$(CONFIG_NETFILTER_NETLINK_ACCT) += nfnetlink_acct.o nfnetlink_queue-y := nfnetlink_queue_core.o -nfnetlink_queue-$(CONFIG_NETFILTER_NETLINK_QUEUE_CT) += nfnetlink_queue_ct.o obj-$(CONFIG_NETFILTER_NETLINK_QUEUE) += nfnetlink_queue.o obj-$(CONFIG_NETFILTER_NETLINK_LOG) += nfnetlink_log.o +obj-$(CONFIG_NETFILTER_NETLINK_QUEUE_CT) += nfnetlink_queue_ct.o # connection tracking obj-$(CONFIG_NF_CONNTRACK) += nf_conntrack.o
net/netfilter/core.c +0 -4
@@ -384,10 +384,6 @@ void nf_conntrack_destroy(struct nf_conntrack *nfct) rcu_read_unlock(); }EXPORT_SYMBOL (nf_conntrack_destroy); - -struct nfq_ct_hook __rcu *nfq_ct_hook__read_mostly ; -EXPORT_SYMBOL_GPL (nfq_ct_hook); -#endif /* CONFIG_NF_CONNTRACK */ #ifdef CONFIG_NF_NAT_NEEDED
net/netfilter/nf_conntrack_netlink.c +3 -9
@@ -2133,7 +2133,7 @@ ctnetlink_alloc_expect(const struct nlattr *const cda[], struct nf_conn *ct,struct nf_conntrack_tuple *tuple, struct nf_conntrack_tuple *mask); -#ifdef CONFIG_NETFILTER_NETLINK_QUEUE_CT +#if IS_ENABLED (CONFIG_NETFILTER_NETLINK_QUEUE_CT )static size_t ctnetlink_nfqueue_build_size (const struct nf_conn *ct) {
@@ -2350,13 +2350,14 @@ ctnetlink_nfqueue_attach_expect(const struct nlattr *attr, struct nf_conn *ct, return 0; } -static struct nfq_ct_hook ctnetlink_nfqueue_hook = { +struct nfq_ct_hook ctnetlink_nfqueue_hook = { .build_size = ctnetlink_nfqueue_build_size, .build = ctnetlink_nfqueue_build, .parse = ctnetlink_nfqueue_parse, .attach_expect = ctnetlink_nfqueue_attach_expect, .seq_adjust = nf_ct_tcp_seqadj_set, }; +EXPORT_SYMBOL_GPL (ctnetlink_nfqueue_hook);#endif /* CONFIG_NETFILTER_NETLINK_QUEUE_CT */ /***********************************************************************
@@ -3341,10 +3342,6 @@ static int __init ctnetlink_init(void)pr_err ("ctnetlink_init: cannot register pernet operations\n" ); goto err_unreg_exp_subsys; } -#ifdef CONFIG_NETFILTER_NETLINK_QUEUE_CT -/* setup interaction between nf_queue and nf_conntrack_netlink. */ -RCU_INIT_POINTER (nfq_ct_hook, &ctnetlink_nfqueue_hook); -#endif return 0 ; err_unreg_exp_subsys:
@@ -3362,9 +3359,6 @@ static void __exit ctnetlink_exit(void)unregister_pernet_subsys (&ctnetlink_net_ops);nfnetlink_subsys_unregister (&ctnl_exp_subsys);nfnetlink_subsys_unregister (&ctnl_subsys); -#ifdef CONFIG_NETFILTER_NETLINK_QUEUE_CT -RCU_INIT_POINTER (nfq_ct_hook,NULL ); -#endif }module_init (ctnetlink_init);
net/netfilter/nfnetlink_queue_core.c +6 -0
@@ -1196,6 +1196,12 @@ nfqnl_recv_config(struct sock *ctnl, struct sk_buff *skb, goto err_out_unlock; }#endif +#if !IS_ENABLED (CONFIG_NETFILTER_NETLINK_QUEUE_CT ) +if (flags & mask &NFQA_CFG_F_CONNTRACK ) { + ret = -EOPNOTSUPP ; + goto err_out_unlock; + } +#endif spin_lock_bh (&queue->lock); queue->flags &= ~mask; queue->flags |= flags & mask;
net/netfilter/nfnetlink_queue_ct.c +29 -0
@@ -7,6 +7,9 @@* */ +#include <linux/kernel.h> +#include <linux/init.h> +#include <linux/module.h> #include <linux/skbuff.h> #include <linux/netfilter.h> #include <linux/netfilter/nfnetlink.h>
@@ -14,6 +17,9 @@#include <net/netfilter/nf_conntrack.h> #include <net/netfilter/nfnetlink_queue.h> +extern struct nfq_ct_hook ctnetlink_nfqueue_hook; +static struct nfq_ct_hook __rcu *nfq_ct_hook__read_mostly ; +struct nf_conn *nfqnl_ct_get (struct sk_buff *entskb,size_t *size,enum ip_conntrack_info *ctinfo) {
@@ -34,6 +40,7 @@ struct nf_conn *nfqnl_ct_get(struct sk_buff *entskb, size_t *size, }return ct; } +EXPORT_SYMBOL_GPL (nfqnl_ct_get);struct nf_conn * nfqnl_ct_parse(const struct sk_buff *skb, const struct nlattr *attr,
@@ -53,6 +60,7 @@ nfqnl_ct_parse(const struct sk_buff *skb, const struct nlattr *attr,return ct; } +EXPORT_SYMBOL_GPL (nfqnl_ct_parse);int nfqnl_ct_put (struct sk_buff *skb,struct nf_conn *ct,enum ip_conntrack_info ctinfo)
@@ -83,6 +91,7 @@ int nfqnl_ct_put(struct sk_buff *skb, struct nf_conn *ct, nla_put_failure:return -1 ; } +EXPORT_SYMBOL_GPL (nfqnl_ct_put);void nfqnl_ct_seq_adjust (struct sk_buff *skb,struct nf_conn *ct,enum ip_conntrack_info ctinfo,int diff)
@@ -96,6 +105,7 @@ void nfqnl_ct_seq_adjust(struct sk_buff *skb, struct nf_conn *ct,if ((ct->status &IPS_NAT_MASK ) && diff) nfq_ct->seq_adjust (skb, ct, ctinfo, diff); } +EXPORT_SYMBOL_GPL (nfqnl_ct_seq_adjust);int nfqnl_attach_expect (struct nf_conn *ct,const struct nlattr *attr,u32 portid,u32 report)
@@ -111,3 +121,22 @@ int nfqnl_attach_expect(struct nf_conn *ct, const struct nlattr *attr,return nfq_ct->attach_expect (attr, ct, portid, report); } +EXPORT_SYMBOL_GPL (nfqnl_attach_expect); + +static int __init nfnl_glue_ct_init (void ) +{ +rcu_assign_pointer (nfq_ct_hook, &ctnetlink_nfqueue_hook); +return 0 ; +} + +static void __exit nfnl_glue_ct_exit(void) +{ +RCU_INIT_POINTER (nfq_ct_hook,NULL ); +synchronize_rcu (); +} + +module_init (nfnl_glue_ct_init); +module_exit (nfnl_glue_ct_exit); + +MODULE_LICENSE ("GPL" ); +MODULE_AUTHOR ("Pablo Neira Ayuso <[email protected]>" );
Signature · 1 line
1.7.10.4