freebsd-nq/sys/netpfil/ipfw/nat64
Andrey V. Elsukov 369bc48dc5 Do not acquire IPFW_WLOCK when a named object is created and destroyed.
Acquiring of IPFW_WLOCK is requried for cases when we are going to
change some data that can be accessed during processing of packets flow.
When we create new named object, there are not yet any rules, that
references it, thus holding IPFW_UH_WLOCK is enough to safely update
needed structures. When we destroy an object, we do this only when its
reference counter becomes zero. And it is safe to not acquire IPFW_WLOCK,
because noone references it. The another case is when we failed to finish
some action and thus we are doing rollback and destroying an object, in
this case it is still not referenced by rules and no need to acquire
IPFW_WLOCK.

This also fixes panic with INVARIANTS due to recursive IPFW_WLOCK acquiring.

MFC after:	1 week
Sponsored by:	Yandex LLC
2017-09-20 22:00:06 +00:00
..
ip_fw_nat64.c
ip_fw_nat64.h
nat64_translate.c Fix IPv6 extension header parsing. The length field doesn't include the 2017-06-29 19:06:43 +00:00
nat64_translate.h
nat64lsn_control.c Do not acquire IPFW_WLOCK when a named object is created and destroyed. 2017-09-20 22:00:06 +00:00
nat64lsn.c
nat64lsn.h
nat64stl_control.c Do not acquire IPFW_WLOCK when a named object is created and destroyed. 2017-09-20 22:00:06 +00:00
nat64stl.c Avoid undefined behavior. 2017-04-14 11:58:41 +00:00
nat64stl.h