From a1dd99c8d42261bee9ad053603ef609b3b947623 Mon Sep 17 00:00:00 2001 From: Evgeny Date: Wed, 15 Apr 2026 17:17:00 +0300 Subject: [PATCH] 1 --- src/etcp_connections.c | 2 +- src/route_bgp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/etcp_connections.c b/src/etcp_connections.c index 33485821..14c7f15e 100644 --- a/src/etcp_connections.c +++ b/src/etcp_connections.c @@ -1465,7 +1465,7 @@ process_decrypted: link->nat_ip = new_nat_ip; link->nat_port = new_nat_port; struct in_addr addr; - addr.s_addr = htonl(new_nat_ip); + addr.s_addr = new_nat_ip; DEBUG_INFO(DEBUG_CATEGORY_CONNECTION, "[%s] NAT address initialized: %s:%u", link->etcp->log_name, ip_to_str(&addr, AF_INET).str, new_nat_port); } else if (link->nat_ip != new_nat_ip || link->nat_port != new_nat_port) { diff --git a/src/route_bgp.c b/src/route_bgp.c index 96e6b71e..a5d95eba 100644 --- a/src/route_bgp.c +++ b/src/route_bgp.c @@ -703,7 +703,7 @@ static void route_bgp_start_link_nat_check(struct ROUTE_BGP* bgp, struct ETCP_LI target_port = ntohs(sin->sin_port); } -// if (!is_local_subnet(target_ip)) { DEBUG_DEBUG(DEBUG_CATEGORY_BGP, "local ip: %s, skip nat check", ip_to_str(&target_ip, AF_INET).str); return; } + if (is_local_subnet(target_ip)) { DEBUG_DEBUG(DEBUG_CATEGORY_BGP, "local connection: %s, skip nat check", ip_to_str(&target_ip, AF_INET).str); return; } // Allocate callback arg struct nat_check_arg* arg = u_calloc(1, sizeof(struct nat_check_arg));