AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 15 Bitcoin

net: reduce log level for PCP/NAT-PMP NOT_AUTHORIZED failures

Public commit record

What the developer wrote

Authored by ANAVHEOBA

93/100 · Strong
net: reduce log level for PCP/NAT-PMP NOT_AUTHORIZED failures

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>
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This change is purely cosmetic: it stops Bitcoin Core from repeatedly printing the same router-related warning in the log. Home routers that don't support automatic port mapping now produce one warning instead of many, with later messages hidden behind a debug log level. There is no security vulnerability being fixed and no behavior of the network code is changed.

Recommended action

No security action needed. Treat as a normal log-quality improvement.

Security signals we found

No strong security signals were identified.

Risk score

Why this scored 15/100

Our methodology →
Potential impact 0/30
Exploitability 0/25
Stealth signal 0/15
Affected reach 0/15
Confidence 10/10
Evidence quality 5/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.