freebsd-dev/sys/contrib/pf
Andrew Thompson febd0759f3 Change the reference counting to count the number of cloned interfaces for each
cloner. This ensures that ifc->ifc_units is not prematurely freed in
if_clone_detach() before the clones are destroyed, resulting in memory modified
after free. This could be triggered with if_vlan.

Assert that all cloners have been destroyed when freeing the memory.

Change all simple cloners to destroy their clones with ifc_simple_destroy() on
module unload so the reference count is properly updated. This also cleans up
the interface destroy routines and allows future optimisation.

Discussed with:	brooks, pjd, -current
Reviewed by:	brooks
2005-10-12 19:52:16 +00:00
..
net Change the reference counting to count the number of cloned interfaces for each 2005-10-12 19:52:16 +00:00
netinet Use in_cksum_skip() to calculate in4_cksum instead of doing handrolled magic 2004-08-05 20:41:38 +00:00