@ -18,6 +18,8 @@
# include "crc32.h"
# include "etcp.h"
# include "route_node.h"
# include "route_bgp.h"
# include "route_ping.h"
# include "../lib/memory_pool.h"
# include "../lib/u_async.h"
# include "../lib/debug_config.h"
@ -1354,6 +1356,12 @@ void etcp_connections_read_callback_socket(socket_t sock, void* arg) {
DEBUG_ERROR ( DEBUG_CATEGORY_CONNECTION , " Failed to reinsert link after addr change " ) ;
goto ec_fr ;
}
// Cancel pending NAT check and reset status
if ( link - > etcp - > instance - > bgp ) {
route_ping_cancel_for_conn ( link - > etcp - > instance - > bgp , link - > etcp ) ;
}
link - > nat_check_status = NAT_CHECK_NONE ;
link - > nat_type = NAT_TYPE_UNKNOWN ;
}
// Link exists - reuse it for recovery
@ -1483,6 +1491,10 @@ void etcp_connections_read_callback_socket(socket_t sock, void* arg) {
DEBUG_INFO ( DEBUG_CATEGORY_CONNECTION , " [%s] Link %p (local_id=%d) initialized and marked as UP (server) " , link - > etcp - > log_name , link , link - > local_link_id ) ;
start_keepalive_timer ( link ) ;
loadbalancer_link_ready ( link ) ;
// Restart NAT check after link is up (e.g. after address change or reinit)
if ( link - > etcp - > instance - > bgp ) {
route_bgp_start_link_nat_check ( link - > etcp - > instance - > bgp , link ) ;
}
return ;