freebsd-nq/sys/contrib
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
..
altq/altq Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
dev Fix "struct ifnet" leak if attach() fails in the middle. 2005-09-16 12:49:06 +00:00
ia64/libuwx Update to BETA 7. Besides C++ support, which is irrelevant to us, 2004-05-09 03:06:25 +00:00
ipfilter/netinet Fix some minor problems before release: 2005-06-23 14:19:02 +00:00
ngatm This commit was generated by cvs2svn to compensate for changes in r146539, 2005-05-23 13:08:32 +00:00
pf Change the reference counting to count the number of cloned interfaces for each 2005-10-12 19:52:16 +00:00