Skip to content

Refactor the interface handling in the netmgr (v9.16)

Ondřej Surý requested to merge 2721-shutdown-race-in-interfacemgr-v9_16 into v9_16

The isc_nmiface_t type was holding just a single isc_sockaddr_t, so we got rid of the datatype and use plain isc_sockaddr_t in place where isc_nmiface_t was used before. This means less type-casting and shorter path to access isc_sockaddr_t members.

At the same time, instead of keeping the reference to the isc_sockaddr_t that was passed to us when we start listening, we will keep a local copy. This prevents the data race on destruction of the ns_interface_t objects where pending nmsockets could reference the sockaddr of already destroyed ns_interface_t object.

(cherry picked from commit 50270de8)

Closes #2721 (closed)

Edited by Ondřej Surý

Merge request reports