refactor(nat_detection): remove BGP dependency, auto trigger on conn_up, clean API

- find_third_node: use nd->inst->connections instead of group->senders_list
- on_conn_up callback auto-calls trigger_checks (no BGP handshake needed)
- Remove group param from link_ready, request_check_all — nat_detection self-sufficient
- Remove trigger_checks + route_ping_cancel_for_conn from public API (internal only)
- topo_group.c: removed last nat_detection_trigger_checks call — completely decoupled
- Header: 4-line summary, no duplicate function list, 7 public functions
This commit is contained in:
Evgeny committed 2026-07-17 21:23:40 +03:00
1 parent 90363650e3
commit b238089678
5 files changed
+50 -77

No files matched your search

+2 -3
View File
@@ -785,9 +785,8 @@ static void handle_client_data(struct control_server* server, struct control_cli
struct etcpmon_cmd_action* cmd = (struct etcpmon_cmd_action*)payload;
if (strncmp(cmd->action, "nat", 3) == 0) {
DEBUG_INFO(DEBUG_CATEGORY_CONTROL, "Action 'nat' received, requesting NAT check for all links");
struct TOPO_GROUP* g = topo_groups_get_default(server->instance->topo_groups);
if (server->instance->nat_det && g)
nat_detection_request_check_all(server->instance->nat_det, g);
if (server->instance->nat_det)
nat_detection_request_check_all(server->instance->nat_det);
} else if (strncmp(cmd->action, "nodes", 5) == 0) {
DEBUG_INFO(DEBUG_CATEGORY_CONTROL, "Action 'nodes' received, dumping all BGP nodes");
uint16_t text_max = (ETCPMON_MAX_MSG_SIZE > 1024) ? ETCPMON_MAX_MSG_SIZE - 512 : 1024;