Closed tomh4x closed 3 years ago
You need to replace the rule with a new rule:
Yes, as stated, that is what I ended up doing. I was asking if code changes on the part of this project would allow for changes to match objects directly.
For example, if one updates the value of iptc.Rule.src
with a new address, the netfilter contents instantly reflect this. It just seemed odd to discover that child objects did not also work that way.
Regardless, thank you for responding and yes replacing the entire rule did work for me.
this should just be a string assignment. digging a bit further...
I then additionally tried to call iptc.ip4tc.Rule.remove_match(), create a new iptc.Match object and call add_match().
This also threw no errors or exceptions and did not update the comment value. I believe my only work-around is to delete the whole rule and re-insert, but is the match issue something that can be fixed?
I think that is preferable (at least for me) and in line with the overall logic of the rest of the iptc logic, no?