mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-09-14 07:01:16 +02:00
Users running on home networks with routers that don't support PCP (Port Control Protocol) or NAT-PMP port mapping receive frequent warning-level log messages every few minutes: "pcp: Mapping failed with result NOT_AUTHORIZED (code 2)" This is expected behavior for many consumer routers that have PCP disabled by default, not an actionable error. Add explicit constants for the NOT_AUTHORIZED result code (value 2) for both NAT-PMP and PCP protocols. Log the first NOT_AUTHORIZED failure at warning level for visibility, then downgrade subsequent occurrences to LogDebug to avoid log noise. Other failure types continue to warn unconditionally. Fixes #34114 Co-authored-by: willcl-ark <will@256k1.dev>
26 KiB
26 KiB