]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit
MFC r254776:
authortrociny <trociny@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 8 Sep 2013 17:47:14 +0000 (17:47 +0000)
committertrociny <trociny@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 8 Sep 2013 17:47:14 +0000 (17:47 +0000)
commit6089bd491cfc8bee664963eb077195058381c9f6
tree6f3e68a8ed24ec866c3ac569b963b6dda36a710a
parentfb586873e4871f08f1be0f198f6ec0278d13fa89
MFC r254776:

Make ipfw nat init/unint work correctly for VIMAGE:

* Do per vnet instance cleanup (previously it was only for vnet0 on
  module unload, and led to libalias leaks and possible panics due to
  stale pointer dereferences).

* Instead of protecting ipfw hooks registering/deregistering by only
  vnet0 lock (which does not prevent pointers access from another
  vnets), introduce per vnet ipfw_nat_loaded variable. The variable is
  set after hooks are registered and unset before they are deregistered.

* Devirtualize ifaddr_event_tag as we run only one event handler for
  all vnets.

* It is supposed that ifaddr_change event handler is called in the
  interface vnet context, so add an assertion.

Reviewed by: zec

git-svn-id: svn://svn.freebsd.org/base/stable/9@255395 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/netpfil/ipfw/ip_fw2.c
sys/netpfil/ipfw/ip_fw_nat.c
sys/netpfil/ipfw/ip_fw_private.h