iptc_delete_entry matchmask parameter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 its trailing values -the
elements, target) and every byte of it should be 0xff.  But obviously
that doesn't work, or I wouldn't be here asking.

Here is a hex dump of the ipt_struct I'm trying to delete form a chain:

00 00 00 00 09 09 09 00 00 00 00 00 ff ff ff 00  00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  06 00 00 00 00 00 00
00 c0 01 e8 01 02 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  30 00 74 63 70 00 00
00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  00 00 ff ff 88 13 88
13 00 00 00 00 00 00 00 00
20 01 63 6f 6d 6d 65 6e 74 00 00 00 00 00 00 00  00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00
41 20 74 65 73 74 20 72 75 6c 65 00 00 00 00 00  00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00
28 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00
ff ff ff ff 00 00 00 00

And here is the mask I'm trying to use:
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff

Any suggestions on why this doesn't work would be gratefully received.

Tom



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux