etcp_connect + BGP_READY callbacks + router reconnect test
- etcp_connect.c: async connect API with EARLY/LATE/BGP_READY callbacks - etcp_connect.h: declaration (via etcp_api.h) - connect_deliver: fix to preserve unfired callback nodes - etcp_set_routing_exchange_state: fires bgp_ready_cbk on TABLE_COMPLETE - route_bgp: TABLE_COMPLETE handler + route_bgp_send_table_complete - etcp.c: connections_count tracking, cleanup on close - test_etcp_router_reconnect: a-b-c topology with b restart (etcp_connect) - test_etcp_connect: unit tests for async connect API - etcp_router: inflight/retrans/close improvements - Various proxy/NAT/router cleanups
This commit is contained in:
1 parent
f1f533a552
commit
0b5a710fe6
36 files changed
+1350
-148
No files matched your search
+3
-2
@@ -265,7 +265,8 @@ struct UTUN_INSTANCE* utun_instance_create_from_config(struct UASYNC* ua, struct
|
||||
DEBUG_ERROR(DEBUG_CATEGORY_MEMORY, "Failed to allocate UTUN_INSTANCE");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
instance->etcp_connect_timeout_tb = 20000;
|
||||
|
||||
// Initialize using common function (config ownership transferred to instance)
|
||||
if (instance_init_common(instance, ua, config) != 0) {
|
||||
// Cleanup on error - caller still owns config since we failed
|
||||
@@ -517,7 +518,7 @@ int utun_instance_init(struct UTUN_INSTANCE *instance) {
|
||||
if (instance->config->global.msg_transport_sock.ss_family != 0) {
|
||||
int mt_ret = msg_transport_init(&instance->msg_t, instance, instance->ua,
|
||||
&instance->config->global.msg_transport_sock,
|
||||
8, ETCP_ID_MSG_TRANSPORT);
|
||||
8, ETCP_RT_ID_MSG_TRANSPORT);
|
||||
if (mt_ret != 0) {
|
||||
DEBUG_WARN(DEBUG_CATEGORY_GENERAL, "Failed to initialize msg_transport, continuing without IPC transport");
|
||||
instance->msg_t = NULL;
|
||||
|
||||
Reference in new issue
Block a user