Draft: Loosen isccc_ccmsg_t checks in ccmsg_senddone()
The conn_shutdown() function is called whenever a control channel connection is supposed to be closed, e.g. after a response to the client is sent or when named is being shut down. That function calls isccc_ccmsg_invalidate(), which resets the magic number in the structure holding the messages exchanged over a given control channel connection (isccc_ccmsg_t). The expectation here is that all operations related to the given control channel connection will have been completed by the time the connection needs to be shut down.
However, if named shutdown is initiated while a control channel message is still in flight, some netmgr callbacks might still be pending when conn_shutdown() is called and isccc_ccmsg_t invalidated. This causes the REQUIRE assertion checking the magic number in ccmsg_senddone() to fail when the latter function is eventually called, resulting in a crash.
Fix by removing the REQUIRE assertion checking the magic number in ccmsg_senddone() as the members of the isccc_ccmsg_t structure used by that function are guaranteed to remain valid until the entire controlconnection_t structure containing the isccc_ccmsg_t structure is destroyed.
Closes #4501 (closed)
Superseded by !8641 (merged)