Skip to content

fix(upnp): panic with "mapping should exist"#6459

Open
ackintosh wants to merge 13 commits into
libp2p:masterfrom
ackintosh:fix-upnp-issue-6377
Open

fix(upnp): panic with "mapping should exist"#6459
ackintosh wants to merge 13 commits into
libp2p:masterfrom
ackintosh:fix-upnp-issue-6377

Conversation

@ackintosh
Copy link
Copy Markdown
Contributor

@ackintosh ackintosh commented May 27, 2026

Description

closes #6377

This PR splits the mappings field into mappings, add_requests, and remove_requests to manage port mappings and in-flight request tracking in separate data structures.

The network_interface_change and listener_with_multiple_addresses tests added in this PR reproduce the issue described in #6377, and both now pass after the fix.

AI Assistance Disclosure

Tools used (required — write none if no AI was used): Claude Code

Attestation (required):

  • I have read every line of this diff, understand what it does, and can explain it in review.

Notes & open questions

#6459 (comment)

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • A changelog entry has been made in the appropriate crates

@ackintosh ackintosh changed the title fix(upnp: panic with "mapping should exist" fix(upnp): panic with "mapping should exist" May 27, 2026
Comment thread protocols/upnp/CHANGELOG.md Outdated
ackintosh and others added 2 commits June 2, 2026 07:09
Co-authored-by: Darius Clark <dariusc93@users.noreply.github.com>
@ackintosh ackintosh force-pushed the fix-upnp-issue-6377 branch from 1093f89 to 8fc9b37 Compare June 1, 2026 22:18
Comment thread protocols/upnp/src/behaviour.rs Outdated
@ackintosh ackintosh marked this pull request as ready for review June 1, 2026 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

upnp: panic with "mapping should exist"

3 participants