Skip to content

Commit 3e72d4c

Browse files
authored
fix(upnp): panic with "mapping should exist"
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. Pull-Request: #6459.
1 parent 7453e47 commit 3e72d4c

2 files changed

Lines changed: 622 additions & 244 deletions

File tree

protocols/upnp/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
- Raise MSRV to 1.88.0.
44
See [PR 6273](https://github.com/libp2p/rust-libp2p/pull/6273).
55

6+
- Fix panic with "mapping should exist" caused by conflating port-level mapping state
7+
with per-request in-flight tracking under a single `listener_id` key.
8+
See [PR 6459](https://github.com/libp2p/rust-libp2p/pull/6459)
9+
610
## 0.6.0
711

812
- Change `Event::NewExternalAddr` and `Event::ExpiredExternalAddr` from tuple variants to struct variants

0 commit comments

Comments
 (0)