Adam Nielsen wrote:
In other words, is there a function only called the first time the rule is
added by iptables? Or should I be keeping track of that myself?
You forget that iptables does not add rules. It replaces entire tables,
and to make that atomic, the new table is checked before the old one
is released. And yes, you usually try to lookup a led trigger first
before creating one, because there can be a table that calls -j LED
twice.
Thanks for the explanation! So - to get it straight in my mind - the
checkentry function will be called multiple times while the trigger exists,
but is the destroy function also called multiple times? Or is checkentry
called whenever tables are created, but destroy only ever called once when the
table is removed for the last time?
They will always be called an equal amount of times - each one
once per target instance.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html