Skip to content

Commit 38ea7ad

Browse files
authored
fix(upnp): use correct mapping protocol for UDP
Return `PortMappingProtocol::UDP` when the multiaddress protocol is UDP. Pull-Request: #4542.
1 parent 6369666 commit 38ea7ad

File tree

5 files changed

+9
-4
lines changed

5 files changed

+9
-4
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ libp2p-pnet = { version = "0.23.0", path = "transports/pnet" }
9797
libp2p-quic = { version = "0.9.2", path = "transports/quic" }
9898
libp2p-relay = { version = "0.16.1", path = "protocols/relay" }
9999
libp2p-rendezvous = { version = "0.13.0", path = "protocols/rendezvous" }
100-
libp2p-upnp = { version = "0.1.0", path = "protocols/upnp" }
100+
libp2p-upnp = { version = "0.1.1", path = "protocols/upnp" }
101101
libp2p-request-response = { version = "0.25.1", path = "protocols/request-response" }
102102
libp2p-server = { version = "0.12.3", path = "misc/server" }
103103
libp2p-swarm = { version = "0.43.4", path = "swarm" }

protocols/upnp/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 0.1.1 - unreleased
2+
3+
- Fix port mapping protocol used for a UDP multiaddress.
4+
See [PR 4542](https://github.com/libp2p/rust-libp2p/pull/4542).
5+
16
## 0.1.0
27

38
- Initial version

protocols/upnp/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "libp2p-upnp"
33
edition = "2021"
44
rust-version = "1.60.0"
55
description = "UPnP support for libp2p transports"
6-
version = "0.1.0"
6+
version = "0.1.1"
77
license = "MIT"
88
repository = "https://github.com/libp2p/rust-libp2p"
99
keywords = ["peer-to-peer", "libp2p", "networking"]

protocols/upnp/src/behaviour.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ fn multiaddr_to_socketaddr_protocol(
544544
Some(multiaddr::Protocol::Udp(port)) => {
545545
return Ok((
546546
SocketAddr::V4(SocketAddrV4::new(ipv4, port)),
547-
PortMappingProtocol::TCP,
547+
PortMappingProtocol::UDP,
548548
));
549549
}
550550
_ => {}

0 commit comments

Comments
 (0)