The local RPC code previously checked for IPv6 availability by examining the existence of /proc/sys/net/ipv6/conf/lo/disable_ipv6 and reading its contents. This approach was unreliable as it depended on filesystem checks rather than testing actual IPv6 functionality. The fix replaces the file-based check with an actual socket binding test to ::1 using a context manager for proper resource management. Socket reuse is enabled to prevent port conflicts. Debug logging is added when IPv6 is unavailable. Unit tests are updated to provide comprehensive coverage of the new implementation. Change-Id: I1e3afabc78f1382ff5248707ff2ca8114d10dd90 Generated-By: Claude Code Sonnet 4 Signed-off-by: Dmitry Tantsur <dtantsur@protonmail.com>
3.8 KiB
3.8 KiB