From 522fa0426c5ea72cf728ede0d341e43b93d90475 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sat, 20 Oct 2018 20:19:15 -0700 Subject: [PATCH] Ensure that NAT-PMP is used if no UPnP IGD is found --- miss/miss.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/miss/miss.cpp b/miss/miss.cpp index 07f85d3..402baed 100644 --- a/miss/miss.cpp +++ b/miss/miss.cpp @@ -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) {