http: Restore requirement of IPv4 bind success

bitcoin/bitcoin: PR #36187

3 suggestions

Earlier concerns neither republished nor resolved: 3 suggestions. See the Run archive for their assessments.

Optional improvements

Link

[suggestion] · RPC bind startup changes lack upgrade guidance

Configurations that previously started with partial RPC bind success can now fail initialization, but the PR adds no release note and the help text does not explain the new requirements.

Location: src/httpserver.cpp:1387 (head).

Details and suggested fix

Previously, one successful endpoint was sufficient. Startup now requires the default IPv4 endpoint or every distinct explicit -rpcbind endpoint, and an explicit address that fails numeric lookup also prevents startup. This affects IPv6-only hosts and configurations containing unavailable or stale endpoints. Add a PR-specific release note describing mandatory default IPv4, optional default IPv6, and all-or-nothing explicit binds. Include the IPv6-only migration using -rpcbind=[::1] -rpcallowip=::1, with clients directed to that endpoint. Clarify these requirements in the -rpcbind help text as well; the new failure log only explains the change after startup has already failed.


Link

[suggestion] · IPv6 bind failure policies lack regression coverage

Both new failure cases occupy only IPv4, so they do not distinguish optional default IPv6 from required explicit IPv6.

Location: test/functional/rpc_bind.py:63 (head).

Details and suggested fix

run_partial_bind_test() always reserves 127.0.0.1. Its explicit configuration lists IPv4 first, so startup aborts before attempting [::1]; the default case does not force an IPv6 failure. Consequently, changing default IPv6 to required or explicit IPv6 to optional would leave these assertions satisfied. Under the existing IPv6 availability gate, reserve [::1]:port with an AF_INET6 socket using IPV6_V6ONLY. For the current policy, assert successful default startup with the optional-address warning, then assert an initialization error with -rpcallowip=::1 -rpcbind=[::1] and the required-address error. If the default address-in-use policy changes, adjust that expectation while retaining explicit IPv6 failure coverage.


Link

[suggestion] · IPv4-only runs skip the default occupied-port check

The new default occupied-IPv4 case runs only through the IPv6-gated branch, leaving IPv4-only hosts without this regression check.

Location: test/functional/rpc_bind.py:175 (head).

Details and suggested fix

The --ipv4 branch runs successful explicit binds but never calls run_partial_bind_test(). Without IPv6 support, the invocation that contains that call is skipped. Also call run_partial_bind_test(False) in the IPv4 branch, keeping the explicit IPv4-plus-IPv6 case behind the IPv6 gate. The default fixture only reserves IPv4 and waits for an initialization error, so it can check that startup reaches the required IPv4 failure even when the earlier optional IPv6 bind fails.


Coverage details

Earlier concerns

Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.