1 minor finding · 3 suggestions
Earlier concerns neither republished nor resolved: 1 suggestion. See the Run archive for their assessments.
Findings
[minor] · Duplicate detection silently drops IPv6 binds with different scopes
Explicit IPv6 endpoints differing only by scope collapse into one listener, although no current configuration producing this trigger was found and production impact remains unconfirmed.
Location: src/httpserver.cpp:261 (head).
Details and suggested fix
With a valid -rpcallowip, -rpcbind=[fe80::1%2] -rpcbind=[fe80::1%3] requests distinct endpoints when the same link-local address exists on both interfaces. Lookup preserves the scope ID and GetSockAddr passes it to the socket, but CService::operator== compares only the network, address bytes and port. The new duplicate check therefore discards the second endpoint without attempting or logging its bind. Base attempted both entries. Besides omitting a requested listener, this leaves an endpoint that another local process could occupy to receive credentials from clients targeting it. Use a bind-specific comparison that includes the scope, such as ToStringAddrPort(), without changing general CService equality. Add coverage showing that identical endpoints collapse while different scopes remain distinct.
Optional improvements
[suggestion] · Default IPv6 bind conflicts remain indistinguishable from unavailable IPv6
Default ::1 conflicts still permit a pre-existing, unconfirmed credential-interception scenario with bitcoin-cli -rpcconnect=localhost, if the resolver returns ::1 first and another local account owns the port.
Location: src/httpserver.cpp:237 (head).
Details and suggested fix
An address-in-use failure on default ::1 only logs a warning. Successful IPv4 binding then lets startup proceed to cookie generation, and the HTTP client sends the cookie in its Basic Authorization header to the first resolved address that connects. The numeric 127.0.0.1 client default is protected by this PR, but the optional flag also tolerates conflicts that do not indicate missing IPv6 support.
Consider returning a typed bind error and making address-in-use fatal for default ::1. Retain fallback for socket-creation failure, EADDRNOTAVAIL and EAFNOSUPPORT, with their Windows equivalents handled explicitly. This requires portable error classification and a matching test, but preserves startup on hosts without IPv6 while rejecting a known conflicting listener.
[suggestion] · Required RPC bind rules are missing from upgrade documentation
Configurations that previously started with a partial set of RPC listeners now abort startup, but neither a release note nor the -rpcbind help explains the new requirements.
Location: src/httpserver.cpp:1380 (head).
Details and suggested fix
Previously, any successful endpoint allowed startup. Now default binding requires 127.0.0.1 even when ::1 works, and active explicit binds require every distinct endpoint to succeed. An unparseable numeric address in an explicit list also aborts startup instead of being skipped when another entry works; hostname binding was not supported before either. This affects IPv6-only hosts and configurations containing temporarily unavailable interfaces. Startup diagnostics explain failures, but operators need advance upgrade guidance. Add a release note and update -rpcbind help to describe required default IPv4, optional default IPv6, and numeric, all-success explicit binds when -rpcallowip is supplied. Include the IPv6-only configuration -rpcbind=[::1] -rpcallowip=::1.
[suggestion] · Partial-bind tests leave the IPv6 required/optional distinction untested
On IPv6-capable hosts, the new tests do not distinguish tolerated default ::1 bind failures from fatal explicit [::1] bind failures.
Location: test/functional/rpc_bind.py:69 (head).
Details and suggested fix
run_partial_bind_test always occupies 127.0.0.1. Its explicit list puts IPv4 first, so initialization returns before attempting IPv6; the other IPv6 cases only assert successful binds. By inspection, making explicit IPv6 optional or default IPv6 required would leave these assertions satisfied on an IPv6-capable host. In the existing IPv6-gated branch, add cases holding socket.create_server(('::1', self.defaultport), family=socket.AF_INET6, reuse_port=True). Assert that default mode starts with the optional-failure log and only the IPv4 listener, converting expected addresses with addr_to_hex as the existing helper does. With explicit IPv4 followed by [::1], assert startup failure and the required-IPv6 failure log. That ordering also exercises an explicit failure after a successful bind; the existing default case already reaches that teardown path.
Earlier concerns
Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.
- [suggestion]: Overlapping RPC binds produce a misleading startup failure (earlier report)