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

Update queue flags to be optional #5

Merged
merged 2 commits into from
Jul 10, 2023

Conversation

noelatmerqury
Copy link
Contributor

Set the Queue flags to be optional because they may not always be provided. For example running the below commands would result in an output JSON that would cause the library to return an error when parsing.

sudo nft add table ip mytable
sudo nft add chain ip mytable out-chain "{ type filter hook output priority 0;}"
sudo nft add rule ip mytable out-chain udp dport 20000 queue num 0

This PR fixes this issue by setting the queue flags as optional. An associated unit test has been added to verify functionality.

@JKRhb JKRhb requested a review from jwhb July 7, 2023 10:10
@noelatmerqury
Copy link
Contributor Author

Fixing an issue with serialisation to JSON. Will push a fix soon.

@noelatmerqury
Copy link
Contributor Author

Fixing an issue with serialisation to JSON. Will push a fix soon.

@JKRhb This has now been fixed and tested.

Copy link
Member

@JKRhb JKRhb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your PR, @noelatmerqury :) The changes look good to me, we'll be able to merge as soon as @jwhb has given his approval :)

@jwhb
Copy link
Member

jwhb commented Jul 10, 2023

Nice contribution, thanks @noelatmerqury!
LGTM.

@jwhb jwhb merged commit 8c6fc03 into namib-project:main Jul 10, 2023
1 check passed
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.

3 participants