|
|
|
|
@ -409,6 +409,8 @@ void utun_instance_destroy(struct UTUN_INSTANCE *instance) {
|
|
|
|
|
instance->running = 0; |
|
|
|
|
stun_nat_destroy(instance); |
|
|
|
|
stun_nat_forget_ports(instance); |
|
|
|
|
/* Оба детектора остановить до callbacks закрываемых сервисов и транспорта. */ |
|
|
|
|
if (instance->nat_det) { nat_detection_destroy(instance->nat_det); instance->nat_det = NULL; } |
|
|
|
|
etcp_padding_stop(&instance->padding); |
|
|
|
|
DEBUG_INFO(DEBUG_CATEGORY_SYS, "[DESTROY] A done — diagnose complete"); |
|
|
|
|
|
|
|
|
|
@ -433,9 +435,6 @@ void utun_instance_destroy(struct UTUN_INSTANCE *instance) {
|
|
|
|
|
auto_socket_destroy(instance); |
|
|
|
|
DEBUG_INFO(DEBUG_CATEGORY_SYS, "[DESTROY] E done — socket_monitor+auto_socket"); |
|
|
|
|
|
|
|
|
|
/* Детектор владеет таймерами и вспомогательными сокетами: остановить до групп/транспорта. */ |
|
|
|
|
if (instance->nat_det) { nat_detection_destroy(instance->nat_det); instance->nat_det = NULL; } |
|
|
|
|
|
|
|
|
|
/* Phase F: BGP */ |
|
|
|
|
if (instance->topo_groups) { |
|
|
|
|
etcp_router_unbind(instance, ETCP_RT_ID_CONN_MGR); |
|
|
|
|
|