From 42041dfe84f813c2b877d7c5f6848a469842678d Mon Sep 17 00:00:00 2001 From: Evgeny Date: Sun, 19 Jul 2026 13:41:25 +0300 Subject: [PATCH] feat: log connection status changes at general=info level (NEW/UP/DOWN/DELETE) --- src/etcp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/etcp.c b/src/etcp.c index 1b3aea5d..eb6f872e 100644 --- a/src/etcp.c +++ b/src/etcp.c @@ -288,6 +288,9 @@ struct ETCP_CONN* etcp_connection_create(struct UTUN_INSTANCE* instance, char* n static void etcp_fire_conn_status(struct ETCP_CONN* etcp, int status) { if (!etcp || !etcp->instance) return; + static const char* names[] = { "NEW", "UP", "DOWN", "DELETE" }; + DEBUG_INFO(DEBUG_CATEGORY_GENERAL, "[%s] Connection status changed to %s", etcp->log_name, + (status >= 0 && status < (int)(sizeof(names)/sizeof(names[0]))) ? names[status] : "?"); struct etcp_status_cbk_entry* cbe = etcp->instance->conn_status_cbks; while (cbe) { struct etcp_status_cbk_entry* n = cbe->next; cbe->fn(etcp, status, cbe->arg); cbe = n; } }