Page MenuHomePhabricator

PCP: follow-ups
ClosedPublic

Authored by PiRK on Apr 9 2026, 11:29.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC68c69262d183: PCP: follow-ups
Summary

pcp: make the ToString method const

https://github.com/bitcoin/bitcoin/pull/31676/changes/01906ce912e945c967316f829c1356f8ff38745f

pcp: make NAT-PMP error codes uint16_t

They are defined as being 16 bits in the RFC and correctly parsed in the code
which may result in an implicit conversion from uint16_t to uint8_t.

https://github.com/bitcoin/bitcoin/pull/31676/changes/6fe1c35c05b353f5cc3f3811fdf46e3b220096e4

net: Quiet down logging when router doesn't support natpmp/pcp

When the router doesn't support natpmp and PCP, one'd normally expect
the UDP packet to be ignored, and hit a time out. This logs a warning
that is already in the debug category. However, there's also the case in
which sending an UDP packet causes a ICMP response. This is returned to
user space as "connection refused" (despite UDP having no concept of
connections).

Move the warnings from Send and Recv to debug level too, to reduce
log spam in that case.

This is a partial backport of core#31676 and core#33311

Test Plan

ninja all check-all

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable