- Make dynamic rule allocation non-blocking
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Sat, 2 Aug 2008 06:35:20 +0000 (06:35 +0000)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Sat, 2 Aug 2008 06:35:20 +0000 (06:35 +0000)
commitaf16209553eeff130659a955f043ee74e838aa95
treedd2a6e13ff40fa211af59c9d86d673b368c560ac
parentd7510ae6e055eb1d972f99601d16dd718803a197
- 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