Hi Jesper, Jesper Dangaard Brouer wrote: > > Correcting a chain references increment bug in libiptc. > > The bug lies in function iptc_delete_entry() / TC_DELETE_ENTRY. The > problem is the construction of "r" the rule entry, that is used for > comparison. The problem is that the function iptcc_map_target() > increase the target chains references count. > > The fix is to use function iptcc_delete_rule() to delete the "r" rule > (as it decrement the counter again). To make it work a small NULL > pointer check is also added iptcc_delete_rule(). > > Signed-off-by: Jesper Dangaard Brouer I don't like too much the is-the-rule-in-list checking in delete_entry, please, could you tell me what you think about the patch attached? I think it's cleaner. Thanks. -- The dawn of the fourth age of Linux firewalling is coming; a time of great struggle and heroic deeds -- J.Kadlecsik got inspired by J.Morris