- Fixed incorrect init_connections() call in test_etcp_simple_traffic.c (was calling server_instance instead of client_instance)
- Fixed double free in timeout_heap_pop() when handling deleted elements
- Enhanced NULL pointer safety in uasync_print_resources() by removing complex heap manipulation
- Added debug logging to timeout_heap_pop() for better error tracking
Test results: test_etcp_simple_traffic now passes without double free errors
Fixed critical bug where my_public_key was not being generated when auto-adding
to config file. The issue had multiple root causes:
1. Buffer size bug: HEXKEY_LEN constant was too small (64) for public key (needs 129)
2. Silent failure in bytes_to_hex() when buffer too small
3. Wrong validation length checks causing incorrect need_* detection
4. Keypair regeneration instead of deriving public key from private key
5. Node ID conditional logic bug inserting it only when private key was invalid
Changes:
- Added PRIV_HEXKEY_LEN (65) and PUB_HEXKEY_LEN (129) constants
- Added is_valid_priv_key() and is_valid_pub_key() with correct length checks
- Added sc_compute_public_key_from_private() to derive public key when possible
- Fixed node_id insertion logic to check need_node_id instead of need_priv_key
- Updated bytes_to_hex() to null-terminate on error
Tested with real config file - public key now correctly generates as 128 hex chars.
- Deleted 11 obsolete debug/isolation test files
- Restored test_pkt_normalizer.c from git repository
- Added test_ecc_encrypt and test_routing to Makefile (2 new functional tests)
- Removed settings.o from PN_OBJS (settings.c deleted)
- Added crc32.o to SC_LIB_OBJS and ETCP_OBJS to fix linker errors
- Removed unused routing_get_stats() function (undefined routing_stats_t type)
- Updated changelog with detailed cleanup summary
Current test count: 16 tests in Makefile (14 original + 2 new)Active test files in tests/: 25 files (was 35)test_ecc_encrypt: PASStest_routing: Compilation OK
- Add CRC32 checksum support using IEEE 802.3 polynomial
- Update sc_encrypt/sc_decrypt API: combine tag and CRC32 into single buffer
- Add SC_CRC32_SIZE, SC_MAX_OVERHEAD constants and SC_ERR_CRC_FAILED error code
- Implement CRC32 calculation before encryption and verification after decryption
- Update connection.c to use new API with error statistics tracking
- Modify test files for compatibility with new API
- All tests pass successfully
- Move all test files to tests/ directory
- Update Makefile to build tests in tests/ directory
- Add fragment reassembly timeout mechanism (500ms default)
- Add error count API (pkt_normalizer_get_error_count, pkt_normalizer_reset_error_count)
- Enhance error handling with timeout callbacks
- Add comprehensive stress tests and edge case tests
- Update .gitignore for build artifacts