]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
* Require explicit table creation before use on kernel side.
authorAlexander V. Chernikov <melifaro@FreeBSD.org>
Sat, 26 Jul 2014 13:37:25 +0000 (13:37 +0000)
committerAlexander V. Chernikov <melifaro@FreeBSD.org>
Sat, 26 Jul 2014 13:37:25 +0000 (13:37 +0000)
commitdb785d319954371674fbb18f6cbc46d9c8bb0c63
tree992bd8b8c50d4af7fe911750b6c929b8a8fe07c6
parente0a8b9ee2978ecd10afacc5304a4c94513ff708d
* Require explicit table creation before use on kernel side.
* Add resize callbacks for upcoming table-based algorithms.

Kernel changes:
* s/ipfw_modify_table/ipfw_manage_table_ent/
* Simplify add_table_entry(): make table creation a separate piece of code.
  Do not perform creation if not in "compat" mode.
* Add ability to perform modification of algorithm state (like table resize).
  The following callbacks were added:
 - prepare_mod (allocate new state, without locks)
 - fill_mod (UH_WLOCK, copy old state to new one)
 - modify (UH_WLOCK + WLOCK, switch state)
 - flush_mod (no locks, flushes allocated data)
 Given callbacks are called if table modification has been requested by add or
   delete callbacks. Additional u64 tc->'flags' field was added to pass these
   requests.
* Change add/del table ent format: permit adding/removing multiple entries
   at once (only 1 supported at the moment).

Userland changes:
* Auto-create tables with warning
sbin/ipfw/tables.c
sys/netpfil/ipfw/ip_fw_sockopt.c
sys/netpfil/ipfw/ip_fw_table.c
sys/netpfil/ipfw/ip_fw_table.h
sys/netpfil/ipfw/ip_fw_table_algo.c