nstun/tcp: set flow_success=true on accept paths so the defer guard doesn't immediately destroy every inbound connection

This commit is contained in:
Robert Swiecki
2026-04-03 01:47:02 +02:00
parent 408d49ed48
commit 86530d8068

View File

@@ -1134,6 +1134,7 @@ void handle_host_tcp_accept(Context* ctx, int listen_fd, const nstun_rule_t& rul
LOG_D("Accepted inbound TCP6 %s:%u -> %s:%u (fd=%d)",
ip6_to_string(key6.daddr6).c_str(), ntohs(key6.dport),
ip6_to_string(key6.saddr6).c_str(), ntohs(key6.sport), fd);
flow_success = true;
} else {
struct sockaddr_in* client4 = reinterpret_cast<struct sockaddr_in*>(&client_ss);
struct sockaddr_in server4 = INIT_SOCKADDR_IN(AF_INET);
@@ -1169,6 +1170,7 @@ void handle_host_tcp_accept(Context* ctx, int listen_fd, const nstun_rule_t& rul
LOG_D("Accepted inbound TCP %s:%u -> %s:%u (fd=%d)",
ip4_to_string(key4.daddr4).c_str(), ntohs(key4.dport),
ip4_to_string(key4.saddr4).c_str(), ntohs(key4.sport), fd);
flow_success = true;
}
}