- Make dynamic rule allocation non-blocking
commitbf373714c906d7bd471149d6cf9dc3dfe8b0317e
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Sat, 2 Aug 2008 06:35:20 +0000 (2 06:35 +0000)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Sat, 2 Aug 2008 06:35:20 +0000 (2 06:35 +0000)
treefeba3f703a01a8360b17abe4d7629a0e4f173c05
parent3d0c38bc990f8cb9827474ae8222bf15239181c0
- Make dynamic rule allocation non-blocking
- Make dynamic rule hash array allocaion non-blocking
  Old behaviour of the hash array allocation is changed in following aspects:
  o  Old hash array is freed only if new hash array allocation succeed
  o  Old hash array is reused, if the allocation makes the hash array size
     less than the old one

After this change, the static rules iteration is non-blocking, so we will not
have trouble to duplicate static rules (using netmsg forwarding) on all CPUs.

# send_reject() called in the rule iteration may block, but it is the last step
# in the rule iteration, so we don't need to worry about it.
sys/net/ipfw/ip_fw2.c