ipfw initialization: SI_ORDER_ANY -> SI_ORDER_MIDDLE?
piso at FreeBSD.org
Sun Mar 2 07:13:31 PST 2008
i just found out that depending on a KLD doesn't imply any
initialization order, thus depending on a lock initialized in the ipfw
init path is _really_ a bad idea from another KLD init path (see
A fix would be to move ipfw init priority from SI_ORDER_ANY to
SI_ORDER_MIDDLE, but i guess there are side effects that i'm
unaware in this modification...
On the other hand, if we keep ipfw at SI_ORDER_ANY, i don't know how
to build stuff that relies on it without opening race conditions:
see ip_fw_nat.c::flush_nat_ptrs() called in rule deletion and
rule configuration paths.
ps yes, next time i'll better read the MODULE_DEPEND man page...
More information about the freebsd-net