diff --git a/src/Makefile.am b/src/Makefile.am index f4bf64c4..967fea4a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -140,6 +140,8 @@ utun_CORE_SOURCES = \ proxy/proxy_protocol.h \ proxy/tcp_proxy_client.c \ routing_layer/etcp_router.c \ + routing_layer/multicast.c \ + routing_layer/multicast.h \ routing_layer/route_tx_stats.c \ routing_layer/route_tx_stats.h \ routing_layer/route_crypto.c \ @@ -326,6 +328,8 @@ libutun_a_SOURCES = \ proxy/proxy_protocol.h \ proxy/tcp_proxy_client.c \ routing_layer/etcp_router.c \ + routing_layer/multicast.c \ + routing_layer/multicast.h \ routing_layer/route_tx_stats.c \ routing_layer/route_tx_stats.h \ routing_layer/route_crypto.c \ diff --git a/src/routing_layer/topo_group.c b/src/routing_layer/topo_group.c index d2a265fa..a3d93665 100644 --- a/src/routing_layer/topo_group.c +++ b/src/routing_layer/topo_group.c @@ -28,6 +28,7 @@ #include "topo_group_connect.h" #include "topo_recovery.h" #include "broadcast.h" +#include "multicast.h" #include "../radio/radio.h" #include "../stream/stream.h" #include "../chat/chat_setting.h" @@ -626,6 +627,7 @@ static struct TOPO_GROUP* topo_group_create(struct UTUN_INSTANCE* instance, uint static void topo_group_destroy(struct TOPO_GROUP* group) { if (!group) return; group->stopping = 1; + multicast_close_group(group->instance, group->group_id); nat_detection_cancel_group(group->instance->nat_det, group->group_id); stream_cancel_group(group->instance, group->group_id); DEBUG_INFO(DEBUG_CATEGORY_SYS, "[GRP_DESTROY] 0 enter grp=%p id=0x%016llx rec_list=%p connect=%p", @@ -1202,6 +1204,7 @@ static void topo_group_routes_changed(struct TOPO_GROUP* group, struct TOPO_GROU topo_group_publish_route(group, id); topo_recovery_changed(group); conn_mgr_routes_changed(group->conn_mgr); + multicast_routes_changed(group->instance); } /* TABLE_COMPLETE подтверждает только NODEINFO текущего обмена. Сбой обмена