Ensure that NAT-PMP is used if no UPnP IGD is found

This commit is contained in:
Cameron Gutman 2018-10-20 20:19:15 -07:00
parent c35241f7d6
commit 522fa0426c

View File

@ -271,7 +271,8 @@ bool UPnPHandleDeviceList(struct UPNPDev* list, bool ipv6, bool enable)
}
else if (ret == 3) {
printf("No UPnP IGD found!" NL);
goto Exit;
FreeUPNPUrls(&urls);
return false;
}
else if (ret == 1) {
printf("Found a connected UPnP IGD" NL);
@ -284,7 +285,7 @@ bool UPnPHandleDeviceList(struct UPNPDev* list, bool ipv6, bool enable)
}
else {
printf("UPNP_GetValidIGD() failed: %d" NL, ret);
goto Exit;
return false;
}
if (ipv6) {