On Mon, 22 Jul 2024 10:24:52 +0800 Yangfl <mmyan...@gmail.com> wrote:
Source: monero
Severity: important
Tags: trixie sid ftbfs patch

Hi,

Please find the attached patch to fix your package for the transition
to miniupnpc 2.2.8.

Hello I didn't test it but this might be a better patch

Index: monero-0.18.3.1+~0+20200826/src/p2p/net_node.inl
===================================================================
--- monero-0.18.3.1+~0+20200826.orig/src/p2p/net_node.inl
+++ monero-0.18.3.1+~0+20200826/src/p2p/net_node.inl
@@ -2989,7 +2989,7 @@
     UPNPUrls urls;
     IGDdatas igdData;
     char lanAddress[64];
-    result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof 
lanAddress);
+    result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof 
lanAddress, NULL, 0);
     freeUPNPDevlist(deviceList);
     if (result > 0) {
       if (result == 1) {
@@ -3007,8 +3007,10 @@
           MLOG_GREEN(el::Level::Info, "Added IGD port mapping.");
         }
       } else if (result == 2) {
-        MWARNING("IGD was found but reported as not connected.");
+        MWARNING("IGD was found but its IP address is reserved (non 
routable).");
       } else if (result == 3) {
+        MWARNING("IGD was found but reported as not connected.");
+      } else if (result == 4) {
         MWARNING("UPnP device was found but not recognized as IGD.");
       } else {
         MWARNING("UPNP_GetValidIGD returned an unknown result code.");
@@ -3057,7 +3059,7 @@
     UPNPUrls urls;
     IGDdatas igdData;
     char lanAddress[64];
-    result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof 
lanAddress);
+    result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof 
lanAddress, NULL, 0);
     freeUPNPDevlist(deviceList);
     if (result > 0) {
       if (result == 1) {
@@ -3072,8 +3074,10 @@
           MLOG_GREEN(el::Level::Info, "Deleted IGD port mapping.");
         }
       } else if (result == 2) {
-        MWARNING("IGD was found but reported as not connected.");
+        MWARNING("IGD was found but its IP address is reserved (non 
routable).");
       } else if (result == 3) {
+        MWARNING("IGD was found but reported as not connected.");
+      } else if (result == 4) {
         MWARNING("UPnP device was found but not recognized as IGD.");
       } else {
         MWARNING("UPNP_GetValidIGD returned an unknown result code.");

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to