-
Notifications
You must be signed in to change notification settings - Fork 126
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
Rule Handle not updated after InsertRule even using Flush. #233
Comments
That tag does not exist. You mean v0.1.0, I assume. Can you try if upgrading to |
Yes my bad I meant v0.1.0 and No upgrading to main does not help.
Also what I think is also a real problem.. is that when Flush a rule, the handler of the rule stays 0 and never gets the real handle of the rule |
Oh, now I see what you mean. InsertRule serializes the provided rule into a buffer and Flush sends that buffer to nftables. The provided rule is neither retained nor updated. I don’t know off the top of my head if the nftables acknowledgement contains enough data to fill in ids at all, but it’s at least not currently implemented. So, yes, you’ll need to do a GetRule to obtain a handle you can use for deletion. |
Thank you. I am closing this issue |
I am using nftables.go v1.0.0 and I am trying to prepare a script to use nftables.
I want simply to add a rule, get that rule's handle and then delete the rule.
Here is my script which does not do the wanted behavior:
I am sorry if this topic is duplicated but other issues did not help me
The text was updated successfully, but these errors were encountered: