Trace the first UDP contacts that affect cold NAT classification

This commit is contained in:
evgeny committed 2026-10-12 19:17:06 +02:00
1 parent 8906e29102
commit f71e94c9d8
2 files changed
+10 -2

No files matched your search

+3 -2
View File
@@ -12,8 +12,8 @@ static void wait_profile(struct nat_fixture *fixture, struct ETCP_SOCKET *socket
}
struct nat_check_status status = {0};
nat_detection_get_status(socket->instance->nat_det, socket, &status);
DEBUG_ERROR(DEBUG_CATEGORY_NAT, "profile wait failed socket=%s mapping=%s inbound=%s phase=%u reason=%s",
socket->name, address_mapping_name(socket->address_profile.mapping),
DEBUG_ERROR(DEBUG_CATEGORY_NAT, "profile wait failed node=%016llx socket=%s mapping=%s inbound=%s phase=%u reason=%s",
(unsigned long long)socket->instance->node_id, socket->name, address_mapping_name(socket->address_profile.mapping),
address_inbound_name(socket->address_profile.inbound), status.phase, nat_check_reason_name(status.reason));
abort();
}
@@ -50,6 +50,7 @@ static void check_snapshot(struct UTUN_INSTANCE *owner, struct ETCP_SOCKET *sock
int main(void) {
debug_config_init(); debug_set_level(DEBUG_LEVEL_WARN); debug_set_category_level(DEBUG_CATEGORY_NAT, DEBUG_LEVEL_DEBUG);
debug_set_category_level(DEBUG_CATEGORY_BGP, DEBUG_LEVEL_DEBUG);
struct nat_fixture fixture; nat_fixture_init(&fixture);
struct SC_MYKEYS first, second;
assert(sc_generate_keypair(&first) == SC_OK && sc_generate_keypair(&second) == SC_OK);