We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f71dd22 commit c9f2f81Copy full SHA for c9f2f81
portmapper/src/upnp.rs
@@ -16,8 +16,8 @@ pub type Gateway = aigd::Gateway<aigd::tokio::Tokio>;
16
17
use crate::{Protocol, defaults::UPNP_SEARCH_TIMEOUT as SEARCH_TIMEOUT};
18
19
-/// Seconds we ask the router to maintain the port mapping. 0 means infinite.
20
-const PORT_MAPPING_LEASE_DURATION_SECONDS: u32 = 0;
+/// Seconds we ask the router to maintain the port mapping. Use 2 hours for now.
+const PORT_MAPPING_LEASE_DURATION_SECONDS: u32 = 2 * 60 * 60;
21
22
/// Tailscale uses the recommended port mapping lifetime for PMP, which is 2 hours. So we assume a
23
/// half lifetime of 1h. See <https://datatracker.ietf.org/doc/html/rfc6886#section-3.3>
0 commit comments