Skip to contentSkip to conversation

checkentry() and detroy () called multiple times

DISCUSSION diegows 2 participants 2 messages May 12, 2003 – May 23, 2003 netfilter

lore
Share & tools
lore

diegows

author
#0 lore raw

I 'm doing a match module and I have i little confusion.

If I insert a rule using my match module, I see that checkentry() is called once. If I insert a rule using my match module again I see that checkentry() is called twice and destroy is called once, and If i insert a rule for third time I see that checkentry is called tree times and destroy twice.

Is this the right? why?

#1 lore raw
Quoted 7 lines · diegows

I 'm doing a match module and I have i little confusion.

If I insert a rule using my match module, I see that checkentry() is called once. If I insert a rule using my match module again I see that checkentry() is called twice and destroy is called once, and If i insert a rule for third time I see that checkentry is called tree times and destroy twice.

because checkentry is called for every rule that is using your match in this table. It is supposed to check the *matchinfo data passed on from userspace.

Quoted 1 line

Is this the right? why?

yes. see above.

Signature · 5 lines
- Harald Welte <[email protected]>             http://www.netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie