miniupnpc: IPv6. Try first with site-local then link-local

fixes #703
This commit is contained in:
Thomas Bernard 2024-05-16 02:06:20 +02:00
parent 8ddd8634d4
commit 1f3b8462f0
No known key found for this signature in database
GPG Key ID: DB511043A31ACAAF
1 changed files with 3 additions and 2 deletions

View File

@ -548,7 +548,7 @@ ssdpDiscoverDevices(const char * const deviceTypes[],
#ifdef _WIN32 #ifdef _WIN32
unsigned long _ttl = (unsigned long)ttl; unsigned long _ttl = (unsigned long)ttl;
#endif #endif
int linklocal = 1; int linklocal = 0; /* try first with site-local multicast */
int sentok; int sentok;
if(error) if(error)
@ -1007,9 +1007,10 @@ ssdpDiscoverDevices(const char * const deviceTypes[],
/* switch linklocal flag */ /* switch linklocal flag */
if(linklocal) { if(linklocal) {
linklocal = 0; linklocal = 0;
--deviceIndex;
} else { } else {
/* try again with linklocal multicast */
linklocal = 1; linklocal = 1;
--deviceIndex;
} }
} }
} }