Re: iptc_delete_entry matchmask parameter

2018-11-15 Thread Florian Westphal
Tom Cook wrote: > For a `struct ipt_entry` that I have retrieved using iptc_next_rule [..] Please don't do this, use ip(6)tables-restore instead. You can pipe input to it and you can use --noflush option for batch processing, including multiple deletes/adds/inserts etc. libiptc doesn't do some

Re: iptc_delete_entry matchmask parameter

2018-11-15 Thread Tom Cook
Or, as an alternative way of saying the same thing, can someone please explain why this doesn't delete all rules from my INPUT chain: extern "C" { #include #include #include } #include #include using namespace std; int main() { auto h = iptc_init("filter"); if (h == 0) { std::cout

iptc_delete_entry matchmask parameter

2018-11-14 Thread Tom Cook
For a `struct ipt_entry` that I have retrieved using iptc_next_rule and which I want to delete from its table, how should I construct the matchmask parameter to iptc_delete_entry? As far as I can tell from reading make_delete_mask, the mask should be the same size as the ipt_entry (including all