Jasper Wiegratz
23dbeabf37
Merge pull request #166 from stevelr/main
...
fix: bitwise flags or with more than two operands
2025-08-15 15:49:28 +02:00
jwhb
f1d6e16bd6
test(expr): bitwise flags or with more than two operands
2025-08-15 15:38:08 +02:00
Paul Holzinger
54ba9a30e9
fix: accept single or multiple set/map flags
...
Like for fib and synproxy flags with nft 1.1.4 a single flag value is
printed as string not array so the parser need to account for that.
Signed-off-by: Paul Holzinger <pholzing@redhat.com >
2025-08-13 15:34:35 +02:00
Paul Holzinger
c7ce1b0c4a
fix: accept single or multiple synproxy flags
...
Like for fib flags with nft 1.1.4 a single flag value is printed as
string not array so the parser need to account for that.
Signed-off-by: Paul Holzinger <pholzing@redhat.com >
2025-08-13 15:34:35 +02:00
Paul Holzinger
d234af6ea1
fix: accept fib flags as string or array
...
nft 1.1.4 changed the json output to return only a single string if
there is only one flag set.[1,2]
The same logic applies to some other types as well which I update in the
following commits.
[1] https://github.com/nftables-rs/nftables-rs/issues/183
[2] https://bugzilla.netfilter.org/show_bug.cgi?id=1806
Fixes #183
Signed-off-by: Paul Holzinger <pholzing@redhat.com >
2025-08-13 15:25:23 +02:00
Paul Holzinger
0294fb2601
fix: correctly parse log opts as array
...
The inffered type by Deserialize is Option<T> which is wrong and thus
the deserialize call fails as it is called on the wrong type. If we have
an array we need to directly use the HashSet type.
Switch one of the log statements in the tests to use two flags to cover
this path.
Signed-off-by: Paul Holzinger <pholzing@redhat.com >
2025-08-13 15:25:22 +02:00
wiegratz
ad0b46a0f5
test(stmt): extend nat test with port range
2025-01-09 22:48:36 +01:00
wiegratz
03db827a9a
test(schema): add set and map nft/json test
2024-10-24 20:09:02 +02:00
wiegratz
3799022069
test: refactor nftables-json test script with unshare
2024-10-21 12:18:38 +02:00
wiegratz
910315ba22
test: add test for synproxy
2024-10-21 12:18:38 +02:00
wiegratz
fd8857314d
test(stmt): add serialization test for flow, flowtable
2024-10-21 10:55:10 +02:00
wiegratz
1ca5421807
test: re-convert json data from nftables files
2024-10-06 18:14:37 +02:00
wiegratz
9f109c51e4
fix(stmt): fix named counter
...
BREAKING CHANGE: Use new enum variants of `Counter`: `Named` and `Anonymous`.
2024-10-06 18:14:32 +02:00
Zoruk
a13a06d072
feat: add tproxy json test
2024-07-03 16:06:42 +02:00
wiegratz
e5fb6d4e48
expr: fix sctp chunks
...
also adds space-keys test for all keys with spaces
2024-01-22 12:26:50 +01:00
wiegratz
cb8937af63
chore: apply lint fixes for nft conversion script
2024-01-22 12:25:18 +01:00
wiegratz
e331c6f8ad
lib: first commit
2022-09-30 17:32:07 +00:00