-
Notifications
You must be signed in to change notification settings - Fork 42
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 table replacements #38
Conversation
FYI you may notice that I've taken quite a different approach than originally suggested. Instead of adding an NPF_CMD_TABLE_SWAP command to the existing IOC_NPF_TABLE Essentially I realised that implementing the
After all this, the application logic required to create, populate and replace a table will require a stack of So when I realised this and also saw that the table population logic is all already there for IOC_NPF_LOAD, this seemed the better solution. Essentially this allows creating & populating a new table using existing Hopefully that all makes sense; comments, critiques or suggestions welcome! |
@yazshel: Just an update -- I have been extremely busy, but have not forgotten about this PR. Also, FYI -- the latest Github version of NPF has been synced to NetBSD-current. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yazshel: Feedback provided. Generally, the changes are very good, just few small things to fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Over to you.
To fix memory leak noticed by rmind.
I'm also thinking that I should add a command to What I'm proposing would be to:
Does that sound like an acceptable approach? Cheers, Timshel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On npfctl improvement: sounds about right, but I think this can be done as a separate pull request (PR).
I can merge this PR later today or tomorrow, if you will be done with the changes.
Requested changes are all done, and I'm happy to make the discussed Let me know if you'd like me to rebase and squash related commits to clean up the git history, or if there is anything else that needs to be changed. Thanks for your feedback and help 👍 |
Thanks. I squash-merge, so it doesn't matter how you commit. I will include your name (and email?) in the NetBSD commit message, unless you prefer otherwise. |
Hi Mindaugas,
Here is some initial work on a new ioctl & library function to replace a table contents, which I'm submitting mainly for comment.
It's completely untested at this stage so please proceed with caution! I am hoping to add a test to npftest and also attempt to build a NetBSD kernel with the updated sources so I can test functionality from greyd.
Let me know if you have any thoughts, criticisms or suggestions!
Cheers,
Timshel