* [PATCH ulogd 1/2] NFLOG: add NFULNL_CFG_F_CONNTRACK flag
@ 2021-10-12 11:15 Ken-ichirou MATSUZAWA
2021-10-30 12:59 ` Jeremy Sowden
0 siblings, 1 reply; 4+ messages in thread
From: Ken-ichirou MATSUZAWA @ 2021-10-12 11:15 UTC (permalink / raw)
To: netfilter-devel; +Cc: Ken-ichirou MATSUZAWA
acquiring conntrack information by specifying 'attack_conntrack=1'
Signed-off-by: Ken-ichirou MATSUZAWA <chamas@h4.dion.ne.jp>
---
input/packet/ulogd_inppkt_NFLOG.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/input/packet/ulogd_inppkt_NFLOG.c b/input/packet/ulogd_inppkt_NFLOG.c
index c314433..ea6fb0e 100644
--- a/input/packet/ulogd_inppkt_NFLOG.c
+++ b/input/packet/ulogd_inppkt_NFLOG.c
@@ -33,7 +33,7 @@ struct nflog_input {
/* configuration entries */
static struct config_keyset libulog_kset = {
- .num_ces = 11,
+ .num_ces = 12,
.ces = {
{
.key = "bufsize",
@@ -102,6 +102,12 @@ static struct config_keyset libulog_kset = {
.options = CONFIG_OPT_NONE,
.u.value = 0,
},
+ {
+ .key = "attach_conntrack",
+ .type = CONFIG_TYPE_INT,
+ .options = CONFIG_OPT_NONE,
+ .u.value = 0,
+ },
}
};
@@ -116,6 +122,7 @@ static struct config_keyset libulog_kset = {
#define nlsockbufmaxsize_ce(x) (x->ces[8])
#define nlthreshold_ce(x) (x->ces[9])
#define nltimeout_ce(x) (x->ces[10])
+#define attach_conntrack_ce(x) (x->ces[11])
enum nflog_keys {
NFLOG_KEY_RAW_MAC = 0,
@@ -597,6 +604,8 @@ static int start(struct ulogd_pluginstance *upi)
flags = NFULNL_CFG_F_SEQ;
if (seq_global_ce(upi->config_kset).u.value != 0)
flags |= NFULNL_CFG_F_SEQ_GLOBAL;
+ if (attach_conntrack_ce(upi->config_kset).u.value != 0)
+ flags |= NFULNL_CFG_F_CONNTRACK;
if (flags) {
if (nflog_set_flags(ui->nful_gh, flags) < 0)
ulogd_log(ULOGD_ERROR, "unable to set flags 0x%x\n",
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH ulogd 1/2] NFLOG: add NFULNL_CFG_F_CONNTRACK flag
2021-10-12 11:15 [PATCH ulogd 1/2] NFLOG: add NFULNL_CFG_F_CONNTRACK flag Ken-ichirou MATSUZAWA
@ 2021-10-30 12:59 ` Jeremy Sowden
2021-11-18 11:07 ` [PATCHv2 " Ken-ichirou MATSUZAWA
0 siblings, 1 reply; 4+ messages in thread
From: Jeremy Sowden @ 2021-10-30 12:59 UTC (permalink / raw)
To: Ken-ichirou MATSUZAWA; +Cc: netfilter-devel
[-- Attachment #1: Type: text/plain, Size: 1809 bytes --]
On 2021-10-12, at 20:15:30 +0900, Ken-ichirou MATSUZAWA wrote:
> acquiring conntrack information by specifying 'attack_conntrack=1'
"attach_conntrack=1"
> Signed-off-by: Ken-ichirou MATSUZAWA <chamas@h4.dion.ne.jp>
> ---
> input/packet/ulogd_inppkt_NFLOG.c | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/input/packet/ulogd_inppkt_NFLOG.c b/input/packet/ulogd_inppkt_NFLOG.c
> index c314433..ea6fb0e 100644
> --- a/input/packet/ulogd_inppkt_NFLOG.c
> +++ b/input/packet/ulogd_inppkt_NFLOG.c
> @@ -33,7 +33,7 @@ struct nflog_input {
> /* configuration entries */
>
> static struct config_keyset libulog_kset = {
> - .num_ces = 11,
> + .num_ces = 12,
> .ces = {
> {
> .key = "bufsize",
> @@ -102,6 +102,12 @@ static struct config_keyset libulog_kset = {
> .options = CONFIG_OPT_NONE,
> .u.value = 0,
> },
> + {
> + .key = "attach_conntrack",
> + .type = CONFIG_TYPE_INT,
> + .options = CONFIG_OPT_NONE,
> + .u.value = 0,
> + },
> }
> };
>
> @@ -116,6 +122,7 @@ static struct config_keyset libulog_kset = {
> #define nlsockbufmaxsize_ce(x) (x->ces[8])
> #define nlthreshold_ce(x) (x->ces[9])
> #define nltimeout_ce(x) (x->ces[10])
> +#define attach_conntrack_ce(x) (x->ces[11])
>
> enum nflog_keys {
> NFLOG_KEY_RAW_MAC = 0,
> @@ -597,6 +604,8 @@ static int start(struct ulogd_pluginstance *upi)
> flags = NFULNL_CFG_F_SEQ;
> if (seq_global_ce(upi->config_kset).u.value != 0)
> flags |= NFULNL_CFG_F_SEQ_GLOBAL;
You have used spaces, not tabs here:
> + if (attach_conntrack_ce(upi->config_kset).u.value != 0)
> + flags |= NFULNL_CFG_F_CONNTRACK;
> if (flags) {
> if (nflog_set_flags(ui->nful_gh, flags) < 0)
> ulogd_log(ULOGD_ERROR, "unable to set flags 0x%x\n",
> --
> 2.30.2
>
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCHv2 ulogd 1/2] NFLOG: add NFULNL_CFG_F_CONNTRACK flag
2021-10-30 12:59 ` Jeremy Sowden
@ 2021-11-18 11:07 ` Ken-ichirou MATSUZAWA
2021-11-23 13:31 ` Pablo Neira Ayuso
0 siblings, 1 reply; 4+ messages in thread
From: Ken-ichirou MATSUZAWA @ 2021-11-18 11:07 UTC (permalink / raw)
To: netfilter-devel; +Cc: Ken-ichirou MATSUZAWA
acquiring conntrack information by specifying "attack_conntrack=1"
Signed-off-by: Ken-ichirou MATSUZAWA <chamas@h4.dion.ne.jp>
---
input/packet/ulogd_inppkt_NFLOG.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/input/packet/ulogd_inppkt_NFLOG.c b/input/packet/ulogd_inppkt_NFLOG.c
index c314433..449c0c6 100644
--- a/input/packet/ulogd_inppkt_NFLOG.c
+++ b/input/packet/ulogd_inppkt_NFLOG.c
@@ -33,7 +33,7 @@ struct nflog_input {
/* configuration entries */
static struct config_keyset libulog_kset = {
- .num_ces = 11,
+ .num_ces = 12,
.ces = {
{
.key = "bufsize",
@@ -102,6 +102,12 @@ static struct config_keyset libulog_kset = {
.options = CONFIG_OPT_NONE,
.u.value = 0,
},
+ {
+ .key = "attach_conntrack",
+ .type = CONFIG_TYPE_INT,
+ .options = CONFIG_OPT_NONE,
+ .u.value = 0,
+ },
}
};
@@ -116,6 +122,7 @@ static struct config_keyset libulog_kset = {
#define nlsockbufmaxsize_ce(x) (x->ces[8])
#define nlthreshold_ce(x) (x->ces[9])
#define nltimeout_ce(x) (x->ces[10])
+#define attach_conntrack_ce(x) (x->ces[11])
enum nflog_keys {
NFLOG_KEY_RAW_MAC = 0,
@@ -597,6 +604,8 @@ static int start(struct ulogd_pluginstance *upi)
flags = NFULNL_CFG_F_SEQ;
if (seq_global_ce(upi->config_kset).u.value != 0)
flags |= NFULNL_CFG_F_SEQ_GLOBAL;
+ if (attach_conntrack_ce(upi->config_kset).u.value != 0)
+ flags |= NFULNL_CFG_F_CONNTRACK;
if (flags) {
if (nflog_set_flags(ui->nful_gh, flags) < 0)
ulogd_log(ULOGD_ERROR, "unable to set flags 0x%x\n",
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCHv2 ulogd 1/2] NFLOG: add NFULNL_CFG_F_CONNTRACK flag
2021-11-18 11:07 ` [PATCHv2 " Ken-ichirou MATSUZAWA
@ 2021-11-23 13:31 ` Pablo Neira Ayuso
0 siblings, 0 replies; 4+ messages in thread
From: Pablo Neira Ayuso @ 2021-11-23 13:31 UTC (permalink / raw)
To: Ken-ichirou MATSUZAWA; +Cc: netfilter-devel
On Thu, Nov 18, 2021 at 08:07:24PM +0900, Ken-ichirou MATSUZAWA wrote:
> acquiring conntrack information by specifying "attack_conntrack=1"
Applied, thanks
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-11-23 13:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-12 11:15 [PATCH ulogd 1/2] NFLOG: add NFULNL_CFG_F_CONNTRACK flag Ken-ichirou MATSUZAWA
2021-10-30 12:59 ` Jeremy Sowden
2021-11-18 11:07 ` [PATCHv2 " Ken-ichirou MATSUZAWA
2021-11-23 13:31 ` Pablo Neira Ayuso
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.