Commit b441f98d authored by Ivan Vilata-i-Balaguer's avatar Ivan Vilata-i-Balaguer
Browse files

Catch overlong UPnP mapping durations.

This may indicate some rogue UPnP server trying to trick or throttle us.
parent cfeb8d98
......@@ -102,6 +102,10 @@ private:
auto query_begin = steady_clock::now();
auto curr_duration = get_mapping_duration(igd, mapping_desc, cancel, yield);
if (curr_duration && *curr_duration > lease_duration) {
LOG_WARN("UPnP: IGD reports excessive mapping lease duration, ignoring");
if (!curr_duration || lease_duration >= *curr_duration + recent_margin) {
// Versions of MiniUPnPd before 2015-07-09 fail to refresh existing mappings,
// see <>,
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment