Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement map support #11

Merged
merged 2 commits into from
Jan 19, 2024
Merged

Implement map support #11

merged 2 commits into from
Jan 19, 2024

Conversation

marcinosypka
Copy link
Contributor

A Verdict enum was moved from a NamedExpression to an Expression, placing it in a NamedExpression was a bug. Accroding to libnftables-json(5) (section VERDICT) a Verdict does not have a "verdict" key, it is "anonymous". e.g.: { "jump": { "target": "my_target"}, and not: { "verdict": { "jump": { "target": "my_target"} } }

Additionally a Verdict::Jump and a Verdict::Goto data was changed to a stmt::JumpTarget struct from a String.

A Map and a Set use almost the same fields, a map additinally uses a map field of type String.

A Verdict enum was moved from a NamedExpression to an Expression,
placing it in a NamedExpression was a bug. Accroding to
libnftables-json(5) (section VERDICT) a Verdict does not have a
"verdict" key, it is "anonymous". e.g.: { "jump": { "target":
"my_target"}, and not: { "verdict": { "jump": { "target": "my_target"} }
}

Additionally a `Verdict::Jump` and a `Verdict::Goto` data was changed to
a `stmt::JumpTarget` struct from a `String`.

A `Map` and a `Set` use almost the same fields, a map additinally uses a
map field of type `String`.
@JKRhb JKRhb requested a review from jwhb January 18, 2024 03:04
The comments can be added to the map.
@jwhb
Copy link
Member

jwhb commented Jan 19, 2024

@marcinosypka Great work, thank you!

@jwhb jwhb merged commit 21b69e7 into namib-project:main Jan 19, 2024
1 check passed
@jwhb jwhb mentioned this pull request Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants