Signed-off-by: Fernando Fernandez Mancera <ffmanc...@riseup.net>
---
net/netfilter/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/netfilter/Kconfig b/net/netfilter/Kconfig
index e57c9d479503..a5b60e6a983e 100644
--- a/net/netfilter/Kconfig
+++ b/net/net
The correct name is "docbook2x-man" not "docbookx2-man".
Signed-off-by: Fernando Fernandez Mancera
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 36148ae..e698a9b 100644
--- a/configure.ac
+++ b/configu
Add basic module functions into nft_osf.[ch] in order to start the
implementation of OSF module in nf_tables.
Signed-off-by: Fernando Fernandez Mancera
---
include/net/netfilter/nft_osf.h | 15 +
net/netfilter/Kconfig | 7 +++
net/netfilter/Makefile | 1 +
net
Signed-off-by: Fernando Fernandez Mancera
---
include/libnftnl/expr.h | 7 +
include/linux/netfilter/osf.h | 15 ++
src/Makefile.am | 1 +
src/expr/osf.c| 263 ++
src/expr_ops.c| 2 +
5 files changed, 288
On 06/27/2018 07:19 PM, Pablo Neira Ayuso wrote:
On Wed, Jun 27, 2018 at 07:11:39PM +0200, Fernando Fernandez Mancera wrote:
Add basic module functions into nft_osf.[ch] in order to start the
implementation of OSF module in nf_tables.
Signed-off-by: Fernando Fernandez Mancera
---
include
Added nf_osf_ttl() and nf_osf_match() into nf_osf.c in order to start the
nftables OSF implementation.
Signed-off-by: Fernando Fernandez Mancera <ffmanc...@riseup.net>
---
include/linux/netfilter/nf_osf.h | 29
include/uapi/linux/netfilter/nf_osf.h | 93 +++
includ
As the first client of nf_osf userspace header is nft_osf and xt_osf, we
rename it to nfnetlink_osf.h
Suggested-by: Jan Engelhardt
Signed-off-by: Fernando Fernandez Mancera
---
include/linux/netfilter/{nf_osf.h => nfnetlink_osf.h} | 2 +-
include/uapi/linux/netfilter/{nf_os
Signed-off-by: Fernando Fernandez Mancera
---
include/linux/netfilter/nf_osf.h | 2 ++
include/uapi/linux/netfilter/nf_osf.h | 2 --
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/netfilter/nf_osf.h b/include/linux/netfilter/nf_osf.h
index aee460fcbd31
El 31 de julio de 2018 7:52:26 CEST, Florian Westphal escribió:
>kbuild test robot wrote:
>> tree:
>https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git
>master
>> head: 4ed8eb6570a49931c705512060acd50058d61616
>> commit: f9324952088f1cd62ea4addf9ff532f1e6452a22 [5/7] netfilter:
Please, apply v2 instead this one. I have fixed a typo.
On 08/04/2018 12:15 AM, Fernando Fernandez Mancera wrote:
Signed-off-by: Fernando Fernandez Mancera
---
doc/primary-expression.txt | 29 +
1 file changed, 29 insertions(+)
diff --git a/doc/primary
Signed-off-by: Fernando Fernandez Mancera
---
doc/primary-expression.txt | 29 +
1 file changed, 29 insertions(+)
diff --git a/doc/primary-expression.txt b/doc/primary-expression.txt
index 50093b4..1445288 100644
--- a/doc/primary-expression.txt
+++ b/doc/primary
Signed-off-by: Fernando Fernandez Mancera
---
tests/py/inet/osf.t | 4 ++--
tests/py/inet/osf.t.payload | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/py/inet/osf.t b/tests/py/inet/osf.t
index 743049a..4db20b7 100644
--- a/tests/py/inet/osf.t
+++ b/tests/py
I think we should place osf_init in nfnl_osf.h so this way we don't need to
include osf.h in rule.c. If you agree I will send another patchset iteration.
Thanks.
El 10 de agosto de 2018 15:02:00 CEST, Fernando Fernandez Mancera
escribió:
>Import iptables/utils/nfnl_osf.c into nftables t
Signed-off-by: Fernando Fernandez Mancera
---
tests/py/inet/osf.t | 6 ++
tests/py/inet/osf.t.payload | 4
2 files changed, 10 insertions(+)
create mode 100644 tests/py/inet/osf.t
create mode 100644 tests/py/inet/osf.t.payload
diff --git a/tests/py/inet/osf.t b/tests/py/inet
Add support for "osf" expression. Example:
table ip foo {
chain bar {
type filter hook input priority 0; policy accept;
osf "Linux" counter packets 3 bytes 132
}
}
Signed-off-by: Fernando Fernandez Mancera
---
Signed-off-by: Fernando Fernandez Mancera
---
doc/primary-expression.txt | 29 +
1 file changed, 29 insertions(+)
diff --git a/doc/primary-expression.txt b/doc/primary-expression.txt
index 50093b4..86f3e52 100644
--- a/doc/primary-expression.txt
+++ b/doc/primary
Signed-off-by: Fernando Fernandez Mancera
---
src/expr/osf.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/expr/osf.c b/src/expr/osf.c
index 1541390..ac7a6f3 100644
--- a/src/expr/osf.c
+++ b/src/expr/osf.c
@@ -91,11 +91,10 @@ nftnl_expr_osf_parse(struct nftnl_expr *e
As no "genre" on pf.os exceed 16 bytes of length, we reduce
NFT_OSF_MAXGENRELEN parameter to 16 bytes and use it instead of IFNAMSIZ.
Signed-off-by: Fernando Fernandez Mancera
---
include/uapi/linux/netfilter/nf_tables.h | 1 +
net/netfilter/nft_osf.c | 8 +++
Signed-off-by: Fernando Fernandez Mancera
---
include/linux/netfilter/nfnetlink_osf.h | 12
include/uapi/linux/netfilter/nfnetlink_osf.h | 13 +
include/uapi/linux/netfilter/xt_osf.h| 1 +
3 files changed, 14 insertions(+), 12 deletions(-)
diff --git
Thanks you for this review, I am going to send a v3 iteration with the changes
done and tested.
El 14 de agosto de 2018 16:10:33 CEST, Pablo Neira Ayuso
escribió:
>On Mon, Aug 13, 2018 at 06:57:08PM +0200, Fernando Fernandez Mancera
>wrote:
>[...]
>> diff --git a/include/nfnl_
Signed-off-by: Fernando Fernandez Mancera
---
tests/py/inet/osf.t | 5 -
tests/py/inet/osf.t.payload | 12 +++-
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/tests/py/inet/osf.t b/tests/py/inet/osf.t
index 4db20b7..6533b84 100644
--- a/tests/py/inet/osf.t
As no "genre" in pf.os exceed 16 bytes of length, we reduce
NFT_OSF_MAXGENRELEN parameter to 16 bytes and use it instead of IFNAMSIZ.
Signed-off-by: Fernando Fernandez Mancera
---
include/linux/netfilter/nf_tables.h | 1 +
src/osf.c | 4 +---
2 files
On 08/06/2018 01:30 PM, Pablo Neira Ayuso wrote:
On Mon, Aug 06, 2018 at 01:24:17PM +0200, Fernando Fernandez Mancera wrote:
Right now, we have "MAXGENRELEN" defined in UAPI, so I am going to use it
instead of define OSF_GENRE_SIZE.
Oh I see.
This is 32 bytes long and we can
As no "genre" on pf.os exceed 16 bytes of length, we reduce OSF_GENRE_SIZE
parameter to 16 bytes and use it instead of IFNAMSIZ.
Signed-off-by: Fernando Fernandez Mancera
---
include/linux/netfilter/nfnetlink_osf.h | 2 ++
net/netfilter/nft_osf.c | 6 ++
2 files
On 08/11/2018 12:03 PM, Pablo Neira Ayuso wrote:
+#endif /* _NF_OSF_H */
diff --git a/include/nfnl_osf.h b/include/nfnl_osf.h
new file mode 100644
index 000..d9287e9
--- /dev/null
+++ b/include/nfnl_osf.h
@@ -0,0 +1,6 @@
+#ifndef _NFNL_OSF_H
+#define _NFNL_OSF_H
+
+int
As we are going to need pf.os file to load OS fingerprints from the incoming
nfnl_osf.c, we copy it into the nftables tree directory "files/osf/".
Signed-off-by: Fernando Fernandez Mancera
---
files/osf/pf.os | 709
1 file changed, 709
Import iptables/utils/nfnl_osf.c into nftables tree with some changes in order
to load OS fingerprints automatically from pf.os file.
Signed-off-by: Fernando Fernandez Mancera
---
include/linux/netfilter/nfnetlink_osf.h | 119 +++
include/nfnl_osf.h | 6 +
include
As we are going to use the function nft_mnl_talk() from the incoming
nftnl_osf.c, we make it public.
Signed-off-by: Fernando Fernandez Mancera
---
include/mnl.h | 4
src/mnl.c | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/include/mnl.h b/include/mnl.h
index
As we are going to use the function nft_mnl_talk() from the incoming
nftnl_osf.c, we make it public.
Signed-off-by: Fernando Fernandez Mancera
---
include/mnl.h | 4
src/mnl.c | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/include/mnl.h b/include/mnl.h
index
Import iptables/utils/nfnl_osf.c into nftables tree with some changes in order
to load OS fingerprints automatically from pf.os file.
Signed-off-by: Fernando Fernandez Mancera
---
include/linux/netfilter/nfnetlink_osf.h | 119 +++
include/nfnl_osf.h | 10 +
src
As no "genre" in pf.os exceed 16 bytes of length, we reduce OSF_GENRE_SIZE
parameter to 16 bytes and use it instead of IFNAMSIZ.
Signed-off-by: Fernando Fernandez Mancera
---
include/osf.h | 2 ++
src/osf.c | 4 +---
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git
Signed-off-by: Fernando Fernandez Mancera
---
tests/py/inet/osf.t | 5 -
tests/py/inet/osf.t.payload | 10 ++
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/tests/py/inet/osf.t b/tests/py/inet/osf.t
index 4db20b7..6533b84 100644
--- a/tests/py/inet/osf.t
As we are going to need pf.os file to load OS fingerprints from the incoming
nfnl_osf.c, we copy it into the nftables tree directory "files/osf/".
Signed-off-by: Fernando Fernandez Mancera
---
configure.ac | 1 +
files/Makefile.am | 3 +-
files/nftables/M
Import iptables/utils/nfnl_osf.c into nftables tree with some changes in order
to load OS fingerprints automatically from pf.os file.
Signed-off-by: Fernando Fernandez Mancera
---
include/linux/netfilter/Makefile.am | 1 +
include/linux/netfilter/nfnetlink_osf.h | 119 +++
include
As we are going to use the function nft_mnl_talk() from the incoming
nftnl_osf.c, we make it public.
Signed-off-by: Fernando Fernandez Mancera
---
include/mnl.h | 4
src/mnl.c | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/include/mnl.h b/include/mnl.h
index
As we are going to need pf.os file to load OS fingerprints from the incoming
nfnl_osf.c, we copy it into the nftables tree directory "files/osf/".
Signed-off-by: Fernando Fernandez Mancera
---
configure.ac | 1 +
files/Makefile.am | 3 +-
files/nftables/M
Import iptables/utils/nfnl_osf.c into nftables tree with some changes in order
to load OS fingerprints automatically from pf.os file.
Signed-off-by: Fernando Fernandez Mancera
---
include/linux/netfilter/Makefile.am | 1 +
include/linux/netfilter/nfnetlink_osf.h | 119 +++
include
As we are going to use the function nft_mnl_talk() from the incoming
nftnl_osf.c, we make it public.
Signed-off-by: Fernando Fernandez Mancera
---
include/mnl.h | 4
src/mnl.c | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/include/mnl.h b/include/mnl.h
index
Signed-off-by: Fernando Fernandez Mancera
---
include/libnftnl/expr.h | 7 +
include/linux/netfilter/nf_tables.h | 18 +++
src/Makefile.am | 1 +
src/expr/osf.c | 242
src/expr_ops.c | 2
Rename nf_osf.c to nfnetlink_osf.c as we introduce nfnetlink_osf which is
the OSF infraestructure.
Signed-off-by: Fernando Fernandez Mancera
---
.../linux/netfilter/{nf_osf.h => nfnetlink_osf.h} | 2 +-
.../linux/netfilter/{nf_osf.h => nfnetlink_osf.h} | 6 +++---
include/uapi/linux/net
Add basic module functions into nft_osf.[ch] in order to implement OSF
module in nf_tables.
Signed-off-by: Fernando Fernandez Mancera
---
include/uapi/linux/netfilter/nf_tables.h | 10 ++
net/netfilter/Kconfig| 7 ++
net/netfilter/Makefile | 1 +
net
Move nfnetlink osf subsystem from xt_osf.c to standalone module so we can
reuse it from the new nft_ost extension.
Signed-off-by: Fernando Fernandez Mancera
---
include/uapi/linux/netfilter/nfnetlink_osf.h | 12 ++
include/uapi/linux/netfilter/xt_osf.h| 9 +-
net/netfilter
Signed-off-by: Fernando Fernandez Mancera
---
include/linux/netfilter/nf_osf.h | 2 +
include/uapi/linux/netfilter/nf_osf.h | 5 +
include/uapi/linux/netfilter/xt_osf.h | 8 --
net/netfilter/Kconfig | 10 +-
net/netfilter/Makefile| 1 +
net/netfilter
osf
xt_osf 16384 1
nf_osf 16384 1 xt_osf
x_tables 40960 3 iptable_filter,xt_osf,ip_tables
Is this enough? Thanks.
On 07/17/2018 07:25 PM, Fernando Fernandez Mancera wrote:
Signed-off-by: Fernando Fernandez Mancera
---
include/linux/netfilter
Thanks, I am going to reorder them.
On 07/16/2018 05:12 PM, Pablo Neira Ayuso wrote:
BTW, this patch should be 2/3.
Order patches in a logic way:
1) Small preparation.
2) Add nfnetlink_osf
3) Add support for osf nft.
You can use git rebase interactive mode to reorder patches.
Thanks.
--
On 07/16/2018 05:10 PM, Pablo Neira Ayuso wrote:
On Sat, Jul 14, 2018 at 04:51:01PM +0200, Fernando Fernandez Mancera wrote:
Signed-off-by: Fernando Fernandez Mancera
---
include/linux/netfilter/nfnetlink_osf.h | 20 +
net/netfilter/Kconfig | 11 ++-
net/netfilter
static struct xt_match xt_osf_match = {
@@ -178,51 +66,23 @@ static struct xt_match xt_osf_match = {
static int __init xt_osf_init(void)
{
int err = -EINVAL;
- int i;
-
- for (i=0; i
err = xt_register_match(_osf_match);
You can just simplify this and so:
Add basic module functions into nft_osf.[ch] in order to implement OSF
module in nf_tables.
Signed-off-by: Fernando Fernandez Mancera
---
include/uapi/linux/netfilter/nf_tables.h | 7 ++
net/netfilter/Kconfig| 7 ++
net/netfilter/Makefile | 1 +
net
Move nfnetlink osf subsystem from xt_osf.c to standalone module so we can
reuse it from the new nft_ost extension.
Signed-off-by: Fernando Fernandez Mancera
---
include/uapi/linux/netfilter/nf_osf.h | 11 ++
include/uapi/linux/netfilter/xt_osf.h | 9 +-
net/netfilter/nfnetlink_osf.c
Rename nf_osf.c to nfnetlink_osf.c as we introduce nfnetlink_osf which is
the OSF infraestructure.
Signed-off-by: Fernando Fernandez Mancera
---
net/netfilter/Kconfig | 15 ++-
net/netfilter/Makefile | 2 +-
net/netfilter/{nf_osf.c
Signed-off-by: Fernando Fernandez Mancera
---
include/libnftnl/expr.h | 4 +
include/linux/netfilter/nf_tables.h | 12 ++
src/Makefile.am | 1 +
src/expr/osf.c | 174
src/expr_ops.c | 2
Hi,
I think I found a typo in socket.h at nftables repository. It is just a
small fix so I propose this patch.
---
From c788837976b674878d8ea819e97e9b4a762db91d Mon Sep 17 00:00:00 2001
From: Fernando Fernandez Mancera
Date: Sat, 21 Jul 2018 21:39:09 +0200
Subject: [PATCH nftables] src: fix
Signed-off-by: Fernando Fernandez Mancera
---
include/linux/netfilter/nfnetlink_osf.h | 20 +
net/netfilter/Kconfig | 11 ++-
net/netfilter/Makefile | 1 +
net/netfilter/nfnetlink_osf.c | 100 +++
net/netfilter/xt_osf.c
Added missing definitions from nf_osf.h in order to extract Passive OS
fingerprint infrastructure from xt_osf.
Signed-off-by: Fernando Fernandez Mancera
---
include/uapi/linux/netfilter/nf_osf.h | 13 +
include/uapi/linux/netfilter/xt_osf.h | 10 ++
2 files changed, 15
Add basic module functions into nft_osf.[ch] in order to start the
implementation of OSF module in nf_tables.
Signed-off-by: Fernando Fernandez Mancera
---
include/uapi/linux/netfilter/nf_tables.h | 10 ++
net/netfilter/Kconfig| 6 ++
net/netfilter/Makefile
It hasn't been tested yet. All necessary changes to introduce
NFTA_OSF_DREG are already done.
After the review and testing I am going to implement the match_packet
function.
On 07/14/2018 04:51 PM, Fernando Fernandez Mancera wrote:
Add basic module functions into nft_osf.[ch] in order
16384 1 xt_osf
x_tables 40960 3 iptable_filter,xt_osf,ip_tables
Is it enough?
Thanks!
On 07/14/2018 04:51 PM, Fernando Fernandez Mancera wrote:
Signed-off-by: Fernando Fernandez Mancera
---
include/linux/netfilter/nfnetlink_osf.h | 20 +
net/netfilter/Kconfig
Tested-by: Fernando Fernandez Mancera
On 07/14/2018 04:50 PM, Fernando Fernandez Mancera wrote:
Added missing definitions from nf_osf.h in order to extract Passive OS
fingerprint infrastructure from xt_osf.
Signed-off-by: Fernando Fernandez Mancera
---
include/uapi/linux/netfilter/nf_osf.h
Tested-by: Fernando Fernandez Mancera
On 07/13/2018 02:54 PM, Pablo Neira Ayuso wrote:
This new function returns the OS genre as a string. Plan is to use to
from the new nft_osf extension.
Note that this doesn't yet support ttl options, but it could be easily
extended to do so.
Signed-off
Remove osf_init variable and call nfnl_osf_load_fingerprints() from
expr_evaluate_osf() instead of doing that from do_command_add() path.
Signed-off-by: Fernando Fernandez Mancera
---
include/osf.h | 1 -
src/evaluate.c | 11 +++
src/nfnl_osf.c | 2 --
src/osf.c | 1 -
src
On 8/31/18 7:19 PM, Pablo Neira Ayuso wrote:
On Thu, Aug 30, 2018 at 07:18:42PM +0200, Fernando Fernandez Mancera wrote:
Remove osf_init variable and call nfnl_osf_load_fingerprints() from
expr_evaluate_osf() instead of doing that from do_command_add() path.
Applied, thanks Fernando.
BTW, I
On 07/12/2018 01:27 PM, Florian Westphal wrote:
Fernando Fernandez Mancera wrote:
+ list_for_each_entry(sf, _osf_fingers[!!f->df], finger_entry) {
+ if (memcmp(>finger, f, sizeof(struct nf_osf_user_finger)))
+ continue;
+
+ kf
Hi Florian, thanks for the review.
On 07/12/2018 01:03 PM, Florian Westphal wrote:
Fernando Fernandez Mancera wrote:
+extern struct list_head nft_osf_fingers[2];
How is this going to be used?
I find it weird to see this in netfilter core.
This list is used to load the OS signatures from
On 07/12/2018 12:53 PM, Florian Westphal wrote:
Fernando Fernandez Mancera wrote:
Add basic module functions into nft_osf.[ch] in order to start the
implementation of OSF module in nf_tables.
+struct nft_osf {
+ chargenre[OSF_GENRE_SIZE];
+ __u32 flags;
+ __u32
Added _ADD and _REMOVE commands to nf_tables_api.c in order to use the
nf_tables interface to add 'osf' signatures in nft.
Signed-off-by: Fernando Fernandez Mancera
---
include/net/netfilter/nf_tables_core.h | 2 +
include/uapi/linux/netfilter/nf_osf.h| 8 ++
include/uapi/linux
Signed-off-by: Fernando Fernandez Mancera
---
include/libnftnl/expr.h | 7 +
include/linux/netfilter/nf_tables.h | 20 +++
src/Makefile.am | 1 +
src/expr/osf.c | 262
src/expr_ops.c | 2
Added nf_osf_ttl() and nf_osf_match() into nf_osf.c in order to start the
nftables OSF implementation.
Signed-off-by: Fernando Fernandez Mancera <ffmanc...@riseup.net>
---
include/linux/netfilter/nf_osf.h | 28
include/uapi/linux/netfilter/nf_osf.h | 97 ++
includ
Added nf_osf_ttl() and nf_osf_match() into nf_osf.c in order to start
the nftables OSF implementation.
From 26ffd9191052c35726026663d75a1a89c44e5f60 Mon Sep 17 00:00:00 2001
From: Fernando Fernandez Mancera <ffmanc...@riseup.net>
Date: Sun, 18 Mar 2018 23:54:20 +0100
Subject: [PATCH]
>From 520cf8eb6b1c7ae803f26fdfe8b49b642b1d51d8 Mon Sep 17 00:00:00 2001
From: Fernando Fernandez Mancera <ffmanc...@riseup.net>
Date: Fri, 30 Mar 2018 15:53:09 +0200
Subject: [PATCH] nf_osf implementation: nf_osf_ttl() and nf_osf_match()
Added nf_osf_ttl() and nf_osf_match() into
Comments below.
On 10/15/18 2:47 PM, Pablo Neira Ayuso wrote:
Please send a v3 including tests/py. More comments below.
On Sat, Sep 29, 2018 at 12:15:17PM +0200, Fernando Fernandez Mancera wrote:
Add support for ttl option in "osf" expression. Example:
table ip foo {
El 22 de octubre de 2018 20:38:13 CEST, Pablo Neira Ayuso
escribió:
>On Mon, Oct 22, 2018 at 05:35:42PM +0200, Fernando Fernandez Mancera
>wrote:
>> I am going to add the necessary NFT_OSF_* definitions in the
>nf_tables.h
>
>Just add a copy of nf_osf.h to nftables t
Add support for ttl option in "osf" expression. Example:
table ip foo {
chain bar {
type filter hook input priority filter; policy accept;
osf skip name "Linux"
}
}
Signed-off-by: Fernando Fernandez Mancera
---
v1:initial patc
---
doc/primary-expression.txt | 20
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/doc/primary-expression.txt b/doc/primary-expression.txt
index 0fda76d..0c02d9d 100644
--- a/doc/primary-expression.txt
+++ b/doc/primary-expression.txt
@@ -187,18 +187,30 @@
On 10/15/18 2:47 PM, Pablo Neira Ayuso wrote:
Please send a v3 including tests/py. More comments below.
On Sat, Sep 29, 2018 at 12:15:17PM +0200, Fernando Fernandez Mancera wrote:
Add support for ttl option in "osf" expression. Example:
table ip foo {
Add support for ttl option in "osf" expression. Example:
table ip foo {
chain bar {
type filter hook input priority filter; policy accept;
osf ttl skip name "Linux"
}
}
Signed-off-by: Fernando Fernandez Mancera
---
v1:initi
Thanks Phil, I will keep this in mind for the next time.
On 10/24/18 12:35 PM, Phil Sutter wrote:
Having to use numerical values for ttl property in JSON is not
practical as these values are arbitrary and meaningful only in
netfilter. Instead align JSON output/input with standard API, accepting
Add ttl option support to the nftables "osf" expression.
Signed-off-by: Fernando Fernandez Mancera
---
v1:initial patch
v2:v2: code correctness and fix the "~" typo.
v3:make priv->ttl = ttl; optional and priv->ttl default value is now 0.
v4:delete "if (ttl_check !=
nft_osf no longer supports "output" hook as xt_osf doesn't either.
Fixes: b96af92d6eaf ("netfilter: nf_tables: implement Passive OS fingerprint
module in nft_osf")
Signed-off-by: Fernando Fernandez Mancera
---
net/netfilter/nft_osf.c | 10 ++
1 file changed, 10
Add support for ttl option in "osf" expression. Example:
table ip foo {
chain bar {
type filter hook input priority filter; policy accept;
osf ttl nocheck name "Linux"
}
}
Signed-off-by: Fernando Fernandez Mancera
---
v1: i
---
doc/primary-expression.txt | 20
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/doc/primary-expression.txt b/doc/primary-expression.txt
index 0fda76d..92dd89a 100644
--- a/doc/primary-expression.txt
+++ b/doc/primary-expression.txt
@@ -187,18 +187,30 @@
Signed-off-by: Fernando Fernandez Mancera
---
include/libnftnl/expr.h | 1 +
include/linux/netfilter/nf_tables.h | 4 +++-
src/expr/osf.c | 26 +-
3 files changed, 29 insertions(+), 2 deletions(-)
diff --git a/include/libnftnl/expr.h b
Add ttl option support to the nftables "osf" expression.
Signed-off-by: Fernando Fernandez Mancera
---
v1: initial patch
v2: code correctness and fix the "~" typo.
---
include/linux/netfilter/nfnetlink_osf.h | 3 ++-
include/uapi/linux/netfilter/nf_tables.h | 7 ++
On 10/3/18 5:36 PM, Pablo Neira Ayuso wrote:
Hi Fernando,
A few comments.
On Sat, Sep 29, 2018 at 12:18:51PM +0200, Fernando Fernandez Mancera wrote:
Add ttl option support to the nftables "osf" expression.
[..]
if (!os_name)
strncpy((char *)dest
On 10/4/18 2:03 PM, Pablo Neira Ayuso wrote:
On Thu, Oct 04, 2018 at 01:57:17PM +0200, Fernando Fernandez Mancera wrote:
[...]
diff --git a/net/netfilter/nfnetlink_osf.c b/net/netfilter/nfnetlink_osf.c
index 00db27dfd2ff..e0fe1b8429ac 100644
--- a/net/netfilter/nfnetlink_osf.c
+++ b/net
Add ttl option support to the nftables "osf" expression.
Signed-off-by: Fernando Fernandez Mancera
---
v1:initial patch
v2:v2: code correctness and fix the "~" typo.
v3:make priv->ttl = ttl; optional and priv->ttl default value is now 0.
---
include/linux/netfi
Sorry, I have forgotten to add "Signed-off-by: Fernando Fernandez
Mancera ". Thanks.
On 9/29/18 12:15 PM, Fernando Fernandez Mancera wrote:
---
doc/primary-expression.txt | 20
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/doc/primary-expres
Signed-off-by: Fernando Fernandez Mancera
---
include/Makefile.am | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/Makefile.am b/include/Makefile.am
index d3a677d..c103f48 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -31,4 +31,5 @@ noinst_HEADERS = cli.h
!
On 9/18/18 1:16 AM, Pablo Neira Ayuso wrote:
On Sun, Sep 16, 2018 at 09:11:12PM +0200, Fernando Fernandez Mancera wrote:
Add support for ttl option in "osf" expression. Example:
table ip foo {
chain bar {
type filter hook input priority filter; pol
On 9/18/18 1:16 AM, Pablo Neira Ayuso wrote:
On Sun, Sep 16, 2018 at 09:11:12PM +0200, Fernando Fernandez Mancera
wrote:
Add support for ttl option in "osf" expression. Example:
table ip foo {
chain bar {
type filter hook input priority filter; policy accept;
osf
Add support for ttl option in "osf" expression. Example:
table ip foo {
chain bar {
type filter hook input priority filter; policy accept;
osf ttl 0 name "Linux"
}
}
Signed-off-by: Fernando Fernandez Mancera
---
Add ttl option support to the nftables "osf" expression.
Signed-off-by: Fernando Fernandez Mancera
---
include/linux/netfilter/nfnetlink_osf.h | 3 ++-
include/uapi/linux/netfilter/nf_tables.h | 7 +++
include/uapi/linux/netfilter/nfnetlink_osf.h | 1 +
net
I have not implemented tests and json support yet because I prefer to do
it after the review of this patchset. Thanks!
On 9/16/18 9:11 PM, Fernando Fernandez Mancera wrote:
Add support for ttl option in "osf" expression. Example:
table ip foo {
chain bar {
t
On 9/18/18 1:16 AM, Pablo Neira Ayuso wrote:
On Sun, Sep 16, 2018 at 09:11:12PM +0200, Fernando Fernandez Mancera wrote:
Add support for ttl option in "osf" expression. Example:
table ip foo {
chain bar {
type filter hook input priority filter; pol
On 9/18/18 1:15 AM, Pablo Neira Ayuso wrote:
On Sun, Sep 16, 2018 at 09:10:16PM +0200, Fernando Fernandez Mancera wrote:
Add ttl option support to the nftables "osf" expression.
Signed-off-by: Fernando Fernandez Mancera
---
include/linux/netfilter/nfnetlink_osf.h | 3 ++-
94 matches
Mail list logo