Leave permanent mappings alone during the update cycle

This commit is contained in:
Cameron Gutman 2020-08-09 15:16:05 -07:00
parent 659d3aea23
commit 47d60b9f24

View File

@ -101,6 +101,11 @@ bool UPnPMapPort(struct UPNPUrls* urls, struct IGDdatas* data, int proto, const
if (!strcmp(intClient, myAddr)) {
if (atoi(leaseDuration) == 0) {
printf("OK (Permanent)" NL);
// If we have an existing permanent mapping, we can just leave it alone.
if (enable) {
return true;
}
}
else {
printf("OK (%s seconds remaining)" NL, leaseDuration);