Skip to content

Fix interface reconfig crashes

Witold Krecicki requested to merge wpk/fix-interface-reconfig-crashes into master
netmgr: have a single source of truth for tcpdns callback

We pass interface as an opaque argument to tcpdns listening socket.
If we stop listening on an interface but still have in-flight connections
the opaque 'interface' is not properly reference counted, and we might
hit a dead memory. We put just a single source of truth in a listening
socket and make the child sockets use that instead of copying the
value from listening socket. We clean the callback when we stop listening.

netmgr: we can't uv_close(sock->timer) when in sock->timer close callback
Edited by Witold Krecicki

Merge request reports