Skip to contentSkip to conversation

Ruleset creation process.

DISCUSSION Padam J Singh 2 participants 3 messages Oct 2, 2004 – Oct 4, 2004 netfilter

lore
Share & tools
lore
#0 lore raw

Is there are document that specifies the ruleset creation process?

I recently had an issue with destroy being called for old rules when adding a new rule for the same target.

Thanks!
Padam Singh.

#1 lore raw
Quoted 1 line · Padam J Singh

Is there are document that specifies the ruleset creation process?

What part of the ruleset creation process?

Quoted 1 line

I recently had an issue with destroy being called for old rules when adding a new rule for the same target.

Destroy of what, where?

If you refer to the match/target destroy functions being called then this is by design of iptables. Each modification to an iptable results in a new table being installed in the kernel and the old deleted.

Regards
Henrik

#2 lore raw
Quoted 5 lines · Henrik Nordstrom
Quoted 1 line · Padam J Singh

Is there are document that specifies the ruleset creation process?

Quoted 8 lines

What part of the ruleset creation process?

Quoted 1 line

I recently had an issue with destroy being called for old rules when adding a new rule for the same target.

Destroy of what, where?

If you refer to the match/target destroy functions being called then this is by design of iptables. Each modification to an iptable results in a new table being installed in the kernel and the old deleted.

Yes, I am talking about the target destroy functions.

What is happening is that once i add a new rule, the old rule's checktarget is called first then it's destroy, leaving my internal states invalid.

So maybe I should traverse the rule link list and setup my internal structures according to that?

Quoted 5 lines

Regards
Henrik

Regards,
Padam J Singh