Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions portmapper/src/upnp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ pub type Gateway = aigd::Gateway<aigd::tokio::Tokio>;

use crate::{Protocol, defaults::UPNP_SEARCH_TIMEOUT as SEARCH_TIMEOUT};

/// Seconds we ask the router to maintain the port mapping. 0 means infinite.
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;

/// Tailscale uses the recommended port mapping lifetime for PMP, which is 2 hours. So we assume a
/// half lifetime of 1h. See <https://datatracker.ietf.org/doc/html/rfc6886#section-3.3>
Expand Down
Loading