Add new internal libraries generated since [1] to the .gitignore file.
[1]: 0b3ccd27e12d ("build: Restore per object CFLAGS")
Signed-off-by: Pablo M. Bermudo Garay <pablo...@gmail.com>
---
.gitignore | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.gitignore b/.gitigno
table ip limits {
limit foo {
limit rate 5/second
^
}
}
This behaviour is inconsistent and breaks the restoration of saved
rule-sets with "nft -f".
Fixes: c0697eabe832 ("src: add stateful object support for limit")
Signed-off-by: Pablo M.
The patch also reorganizes ip/objects.t file.
Signed-off-by: Pablo M. Bermudo Garay <pablo...@gmail.com>
---
tests/py/any/objects.t| 2 ++
tests/py/ip/objects.t | 20 +---
tests/py/ip/objects.t.payload | 16
3 files changed, 35 insertions
2017-08-23 23:51 GMT+02:00 Pablo Neira Ayuso <pa...@netfilter.org>:
> On Wed, Aug 23, 2017 at 11:06:14PM +0200, Pablo M. Bermudo Garay wrote:
>> Maybe the commit title is confusing, since "limit" seems the typical
>> imperative mood instead of a noun.
>>
Maybe the commit title is confusing, since "limit" seems the typical
imperative mood instead of a noun.
Pablo, should I resend the patches with a better title?
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majord...@vger.kernel.org
More
Separator was misspelled as "seperator" in a symbol name.
Signed-off-by: Pablo M. Bermudo Garay <pablo...@gmail.com>
---
src/parser_bison.y | 74 +++---
1 file changed, 37 insertions(+), 37 deletions(-)
diff --git a/src/pars
This patch adds support for a new type of stateful object: limit.
Creation, deletion and listing operations are supported.
Signed-off-by: Pablo M. Bermudo Garay <pablo...@gmail.com>
---
include/linux/netfilter/nf_tables.h | 3 +-
include/rule.h | 13 +
i
This patch adds support for a new type of stateful object: limit.
Signed-off-by: Pablo M. Bermudo Garay <pablo...@gmail.com>
---
include/libnftnl/object.h | 8 ++
include/linux/netfilter/nf_tables.h | 3 +-
include/obj.h | 8 ++
src/Makef
Register a new limit stateful object type into the stateful object
infrastructure.
Signed-off-by: Pablo M. Bermudo Garay <pablo...@gmail.com>
---
include/uapi/linux/netfilter/nf_tables.h | 3 +-
net/netfilter/nft_limit.c| 118 ++-
2 files c
Just a small refactor patch in order to improve the code readability.
Signed-off-by: Pablo M. Bermudo Garay <pablo...@gmail.com>
---
include/uapi/linux/netfilter/nf_tables.h | 2 +-
net/netfilter/nft_limit.c| 30 +++---
2 files changed, 16 inse
nft-sync development has been stalled for two years. Since then the
libnftnl API has changed, breaking the build.
Apply the required changes to make the project build again.
Signed-off-by: Pablo M. Bermudo Garay <pablo...@gmail.com>
---
include/mnl.h | 13 +++--
src/mnl.c
: xtables_ip4_restore_main (xtables-restore.c:534)
Fix these memory leaks.
Signed-off-by: Pablo M. Bermudo Garay <pablo...@gmail.com>
---
iptables/nft.c | 10 +++---
iptables/xtables-restore.c | 8 +++-
iptables/xtables.c | 2 ++
3 files changed, 16 insertions(+), 4 del
-compat-multi)
==1604==by 0x10F636: main (in /usr/local/sbin/xtables-compat-multi)
Fix these memory leaks.
Signed-off-by: Pablo M. Bermudo Garay <pablo...@gmail.com>
---
iptables/nft-ipv4.c | 2 ++
iptables/nft-ipv6.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/iptables/nft-
Sometimes it can be useful to test if a command is valid without
applying any change to the rule-set. This commit adds a new option
flag (-c | --check) that performs a dry run execution of the commands.
Signed-off-by: Pablo M. Bermudo Garay <pablo...@gmail.com>
---
doc/nft.xml
The new structure nft_ctx is meant to be used as a generic container of
context information.
This is a preparatory patch. So at the moment the struct just carry
output_ctx on his path through main.c and cli.c.
Signed-off-by: Pablo M. Bermudo Garay <pablo...@gmail.com>
---
include
This change should have been included in commit f035be35c749
("xtables-translate: fix multiple spaces issue"), but was forgotten.
Signed-off-by: Pablo M. Bermudo Garay <pablo...@gmail.com>
---
extensions/libip6t_icmp6.c | 2 --
1 file changed, 2 deletions(-)
diff --
he target
translation.
Signed-off-by: Pablo M. Bermudo Garay <pablo...@gmail.com>
---
iptables/nft-ipv4.c | 2 +-
iptables/nft-ipv6.c | 2 +-
iptables/xtables-translate.c | 11 ++-
3 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/iptables/nft-ipv4.c
The owner name was hard-coded in the owner extension translation test.
The translation process requires the user to exist in the system, so
this commit replaces it with the usual UID_MIN value (1000).
Signed-off-by: Pablo M. Bermudo Garay <pablo...@gmail.com>
---
extensions/libxt_owner.
2017-04-25 14:35 GMT+02:00 Arturo Borrero Gonzalez :
> Print elements per line instead of all in a single line.
> The elements which can be 'short' are printed 5 per line,
> and others, like IPv4 addresses are printed 2 per line.
The default terminfo tab size is 8. Why not
Signed-off-by: Pablo M. Bermudo Garay <pablo...@gmail.com>
---
xlate-test.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/xlate-test.py b/xlate-test.py
index 37760e9..43c4be1 100755
--- a/xlate-test.py
+++ b/xlate-test.py
@@ -72,7 +72,9 @@ def load_test_files():
This commit replaces subprocess.run (introduced in python 3.5) with
subprocess.Popen (supported since the first version of python 3).
Furthermore, the output has been improved when ip[6]tables-translate
exits with non-zero return code.
Signed-off-by: Pablo M. Bermudo Garay <pablo...@gmail.
> Nice... But how this works? :)
>
> # python xlate-test.py
> Traceback (most recent call last):
> File "xlate-test.py", line 85, in
> main()
> File "xlate-test.py", line 78, in main
> load_test_files()
> File "xlate-test.py", line 65, in load_test_files
> run_test(test,
A INPUT -p tcp --dport 80 -m cpu ! --cpu 1 -j ACCEPT
nft add rule ip filter INPUT tcp dport 80 cpu != 1 counter accept
Signed-off-by: Pablo M. Bermudo Garay <pablo...@gmail.com>
---
extensions/generic.txlate| 5 +++
extensions/libip6t_DNAT.txlate | 11 +
extensions/li
If quotes are escaped, nft -f is unable to parse and load the translated
ruleset.
Signed-off-by: Pablo M. Bermudo Garay <pablo...@gmail.com>
---
Changes in v3:
- Add a new field to the iptables_command_state struct instead of
propagate 'bool restore' argument.
iptables/xsh
by xtables-compat -L and xtables-compat-save
commands.
Signed-off-by: Pablo M. Bermudo Garay <pablo...@gmail.com>
---
Changes in V3:
- Simplify code.
iptables/nft.c | 194
iptables/nft.h | 2 +
iptables/xtables-save.c
causing changes in the ruleset must invalidate
the cache, a function called flush_rule_cache has been introduced for
this purpose.
Signed-off-by: Pablo M. Bermudo Garay <pablo...@gmail.com>
---
Changes in V3:
- Simplify code.
- Update commit message.
iptables/nft.
by xtables-compat -L and xtables-compat-save
commands.
Signed-off-by: Pablo M. Bermudo Garay <pablo...@gmail.com>
---
iptables/nft.c | 192
iptables/nft.h | 2 +
iptables/xtables-save.c | 5 ++
iptables/xtables.c | 5 ++
4
If quotes are escaped, nft -f is unable to parse and load the translated
ruleset.
Signed-off-by: Pablo M. Bermudo Garay <pablo...@gmail.com>
---
Changes in v2:
- Do not use strcmp against 'program_name' global, propagate 'bool restore'
argument instead.
iptables/nft-ipv4.c
The comment_xlate function was not supporting this option that is
necessary in some situations.
Signed-off-by: Pablo M. Bermudo Garay <pablo...@gmail.com>
---
Changes in v2:
- Ensure that the comment string is null-terminated.
extensions/libxt_comment.c | 11 ++-
iptables/nft-
for
the sake of simplicity.
Signed-off-by: Pablo M. Bermudo Garay <pablo...@gmail.com>
---
iptables/nft.c | 38 ++
iptables/nft.h | 3 ---
2 files changed, 14 insertions(+), 27 deletions(-)
diff --git a/iptables/nft.c b/iptables/nft.c
index 05ba57a..247a60a
has been introduced for
this purpose.
Signed-off-by: Pablo M. Bermudo Garay <pablo...@gmail.com>
---
iptables/nft.c | 35 +++
iptables/nft.h | 1 +
2 files changed, 24 insertions(+), 12 deletions(-)
diff --git a/iptables/nft.c b/iptables/nft.c
index 7
.
Signed-off-by: Pablo M. Bermudo Garay <pablo...@gmail.com>
---
iptables/nft.c | 166
iptables/nft.h | 2 +
iptables/xtables-save.c | 5 ++
iptables/xtables.c | 5 ++
4 files changed, 178 insertions(+)
diff --git a/ip
2016-08-17 16:23 GMT+02:00 Pablo Neira Ayuso <pa...@netfilter.org>:
> On Tue, Aug 16, 2016 at 07:44:32PM +0200, Pablo M. Bermudo Garay wrote:
>> The comment_xlate function was not supporting this option that is
>> necessary in some situations.
>
> I have applied what
If quotes are escaped, nft -f is unable to parse and load the translated
ruleset.
Signed-off-by: Pablo M. Bermudo Garay <pablo...@gmail.com>
---
iptables/xtables-translate.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/iptables/xtables-translate.c b/iptables/x
The comment_xlate function was not supporting this option that is
necessary in some situations.
Signed-off-by: Pablo M. Bermudo Garay <pablo...@gmail.com>
---
extensions/libxt_comment.c | 9 -
iptables/nft-ipv4.c| 2 +-
iptables/nft-ipv6.c| 2 +-
3 files chang
ip[6]tables-compat -L was not printing the comments since commit
d64ef34a9961 ("iptables-compat: use nft built-in comments support").
This patch solves the issue.
Signed-off-by: Pablo M. Bermudo Garay <pablo...@gmail.com>
---
iptables/nft-shared.c | 26 ++
2016-07-25 17:31 GMT+02:00 Pablo Neira Ayuso <pa...@netfilter.org>:
> On Fri, Jul 22, 2016 at 05:48:34PM +0200, Pablo M. Bermudo Garay wrote:
>> Some translations included escaped quotes when they were called from
>> nft:
>>
>> $ sudo nft list ruleset
>>
0 bytes 0
^^ ^^
}
}
This behavior is only correct when xlate functions are called from a
xtables-translate command. This patch solves that issue if nft revision
is using the field added to the xt_xlate struct with "xtables-translate:
add new field to identify the caller" commit.
Signed-off-by: Pablo M.
From: Pablo Neira
Needed by the follow up xt compatibility layer patch.
Signed-off-by: Arturo Borrero Gonzalez
Signed-off-by: Pablo Neira Ayuso
---
Resubmission of xt compat support preparatory patch.
Changes in v5:
From: Pablo Neira
The xt over nft support that comes in follow up patches need this, and update
the corresponding Makefile.am.
Based on patch from Arturo Borrero Gonzalez.
Signed-off-by: Pablo Neira Ayuso
---
Resubmission of xt compat support
for all their rules.
Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.g...@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pa...@netfilter.org>
Signed-off-by: Pablo M. Bermudo Garay <pablo...@gmail.com>
---
New version of the original work made by Arturo and Pablo.
Changes in
,established counter packets 0 bytes 0 accept
^^
ip protocol tcp tcp dport 80-85 ip ttl gt 5 counter packets 0 bytes 0
accept
^^ ^^
}
}
Signed-off-by: Pablo M. Bermudo Garay <pablo...@gmail.
rs can (re)load it using
"nft -f" and get nft native support for all their rules.
Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.g...@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pa...@netfilter.org>
Signed-off-by: Pablo M. Bermudo Garay <pablo...@gmail.com>
---
From: Pablo Neira
Needed by the follow up xt compatibility layer patch.
Signed-off-by: Arturo Borrero Gonzalez
Signed-off-by: Pablo Neira Ayuso
---
Resubmission of xt compat support preparatory patch.
Changes in v4:
From: Pablo Neira
The xt over nft support that comes in follow up patches need this, and update
the corresponding Makefile.am.
Based on patch from Arturo Borrero Gonzalez.
Signed-off-by: Pablo Neira Ayuso
---
Resubmission of xt compat support
rs can (re)load it using
"nft -f" and get nft native support for all their rules.
Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.g...@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pa...@netfilter.org>
Signed-off-by: Pablo M. Bermudo Garay <pablo...@gmail.com>
---
From: Pablo Neira
Needed by the follow up xt compatibility layer patch.
Signed-off-by: Arturo Borrero Gonzalez
Signed-off-by: Pablo Neira Ayuso
---
Resubmission of xt compat support preparatory patch.
include/erec.h
From: Pablo Neira
The xt over nft support that comes in follow up patches need this, and update
the corresponding Makefile.am.
Based on patch from Arturo Borrero Gonzalez.
Signed-off-by: Pablo Neira Ayuso
---
Resubmission of xt compat support
After this patch, iptables-compat uses nft built-in comments support
instead of comment match.
This change simplifies the treatment of comments in nft after load a
rule set through iptables-compat-restore.
Signed-off-by: Pablo M. Bermudo Garay <pablo...@gmail.com>
---
iptables/nft-ipv4.
et_service
elements = { 192.168.1.101 : http-alt}
}
}
Now an error is shown:
# nft list set filter test
:1:1-20: Error: Could not process rule: Set 'test' does not exist
list set filter test
Signed-off-by: Pablo M. Bermudo Garay <pablo
2016-06-01 11:20 GMT+02:00 Pablo Neira Ayuso :
> I'd suggest:
>
> set == NULL && set->flags & (SET_F_EVAL | SET_F_MAP)
Oh, sure. Thank you for pointing that out.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a
et_service
elements = { 192.168.1.101 : http-alt}
}
}
Now an error is shown:
# nft list set filter test
:1:1-20: Error: Could not process rule: Set 'test' does not exist
list set filter test
Signed-off-by: Pablo M. Bermudo Garay <pablo
elements = { 2001:db8::ff00:42:8329 : http}
}
}
Signed-off-by: Pablo M. Bermudo Garay <pablo...@gmail.com>
---
include/rule.h | 1 +
src/evaluate.c | 10 ++
src/parser_bison.y | 4
src/rule.c | 2 ++
4 files changed, 17 insertions(+)
diff
This commit adds a new command that displays the definition of a single
flow table:
If no family is specified, ip is assumed.
Signed-off-by: Pablo M. Bermudo Garay <pablo...@gmail.com>
---
include/rule.h | 1 +
src/evaluate.c | 11 +++
src/parser_bison.y | 4
src/
This commit adds a new command that lists flow tables:
# nft list flow tables [family]
Only the declaration is displayed. If no family is specified, all flow
tables of all families are listed.
Signed-off-by: Pablo M. Bermudo Garay <pablo...@gmail.com>
---
include/rule.h | 1
55 matches
Mail list logo