Commit Graph
19 Commits
Author SHA1 Message Date
Evgeny 075c4f4583 memory_pool: name field — идентификация пула в диагностике коррапшна 2026-06-09 22:20:25 +03:00
Evgeny a0e5446790 migrate NAT and DATA to etcp_router, fix warnings and destroy order 2026-05-10 14:00:49 +03:00
Evgeny c24a6367cc add IPv6 default route interface auto-detection for permanent/temporary IPv6 without netif
- get_default_route_netif_index(): UDP connect trick + getifaddrs to find default route iface
- etcp_socket_add(): auto-detect netif_index when not specified in config
- queue_new() API: explicit index_offset/index_size params instead of implicit from hash_size
- radix: cleanup types (uint8_t*), replace bzero/bcmp with memset/memcmp, remove kernel ifdefs
- route6_lib: new IPv6 routing library + get_node_v6_routes()
2026-05-10 00:05:23 +03:00
Evgeny d74ab1c1c6 Add name parameter to uasync_set_timeout for timer identification in dumps 2026-04-21 19:06:45 +03:00
Evgeny 097e1acc6d queue: add variable size hash
bgp: add to headers new node info
2026-03-28 21:52:46 +03:00
jeka 5816fbea70 1 2026-03-08 17:19:38 +03:00
Evgeny 4656f87f98 Test: add etcp_conn_reinit stub to fail standalone test if called 2026-03-07 15:15:21 +03:00
jeka 1811764f6d +queue names 2026-03-06 21:01:24 +03:00
jeka 15c7968c8c mem 2026-03-06 01:36:57 +03:00
jeka de053a00c0 cleanup tests (winsock) 2026-03-04 17:27:33 +03:00
jeka fcdd07ba94 фиксы тестов (winsock) 2026-03-04 15:30:32 +03:00
Evgeny 57b2568ad6 Fix: Adapt tests for new etcp_api callback in pn_init()
The pn_init() function now sets up etcp_int_recv as callback for pn->output.
Tests that manually poll pn->output need to reset this callback to NULL.

Changes:
- test_pkt_normalizer_etcp.c: Reset callback after pn_init() for client and server
- test_pkt_normalizer_standalone.c: Reset callback after pn_init()

This allows tests to manually poll output queue without conflicting
with the automatic callback mechanism.

Test Results: All 19 tests PASS
2026-02-13 19:41:15 +03:00
Evgeny 277ab872bf Fix: routing initialization timing and test callbacks
- Fixed race condition: routing_add_conn called before etcp->normalizer was assigned

- Moved routing_add_conn from pn_init to etcp_connection_create after normalizer init

- Added routing.h include to etcp.c

- Fixed tests: disable routing callback on output_queue to keep packets for test verification

All 19 tests now pass.
2026-02-07 23:41:07 +03:00
Evgeny 3281e4878e Backup before fixing test_etcp_simple_traffic 2026-02-06 01:34:03 +03:00
Evgeny b811aafd12 Fix: Remove duplicate uasync_destroy call in test_pkt_normalizer_standalone 2026-02-05 20:54:09 +03:00
Evgeny beafb9b198 Fix: Remove usleep from event loops and fix segfault in tests
- Removed usleep(5000) from all test event loops
- Changed to use single shared uasync for server and client instances
- Removed uasync_destroy from utun_instance_destroy to prevent double-free
- Added explicit uasync_destroy calls in all tests and main program
- Fixed segfault in test_pkt_normalizer_etcp and test_etcp_100_packets
- Added DEBUG_TRACE to all functions in etcp.c and etcp_connections.c

Tests now run without artificial delays and complete successfully.
2026-02-05 20:51:07 +03:00
Evgeny 528c1ddd00 WIP: Current normalizer changes before error handling fix 2026-02-04 23:24:25 +03:00
Evgeny f509161701 Fix: Packet normalizer now correctly fragments large packets
- Changed frag_size from mtu-100 to data_pool->object_size (1500 bytes)
- Added packet splitting for packets larger than fragment size
- First fragment contains [2-byte size][data], subsequent fragments contain [data]
- Unpacker correctly assembles packets from multiple fragments
- packer_cb now processes all available packets in a loop instead of one at a time
- Removed manual queue processing from test, now uses callbacks properly
- All 17 tests pass including test_pkt_normalizer_standalone with 3000-byte packets
2026-02-04 01:08:52 +03:00
Evgeny 5840e77e1e Fix test_pkt_normalizer_etcp: fixed packet normalizer and test verification logic
- Fixed pkt_normalizer.c to send packets immediately instead of buffering
- Added queue_resume_callback() call in etcp.c after adding to output_queue
- Updated test to use simple checksum verification instead of pattern-based
- Added strict sequence order checking in test
- Reduced MAX_TEST_PACKET_SIZE to 1400 to fit in normalizer fragment
- Reduced TOTAL_PACKETS to 10 and TEST_TIMEOUT_MS to 5s for faster testing
2026-02-03 23:54:15 +03:00