windows: Only attempt to bind when the network interface is up (#1527)
Previously if the system had an interface with a static IP configured, coturn would attempt to bind to that address, even if the interface was down. This would fail, and prevent coturn from starting (even if there were other usable interfaces)
This commit is contained in:
parent
00ce90cee0
commit
1f74024a30
@ -327,6 +327,12 @@ static int make_local_listeners_list(void) {
|
||||
printf("\tIfIndex (IPv4 interface): %u\n", pCurrAddresses->IfIndex);
|
||||
printf("\tAdapter name: %s\n", pCurrAddresses->AdapterName);//*/
|
||||
|
||||
if (pCurrAddresses->OperStatus != IfOperStatusUp)
|
||||
{
|
||||
pCurrAddresses = pCurrAddresses->Next;
|
||||
continue;
|
||||
}
|
||||
|
||||
pUnicast = pCurrAddresses->FirstUnicastAddress;
|
||||
if (pUnicast != NULL) {
|
||||
// printf("\tNumber of Unicast Addresses:\n");
|
||||
@ -596,6 +602,12 @@ static int make_local_relays_list(int allow_local, int family) {
|
||||
printf("\tIfIndex (IPv4 interface): %u\n", pCurrAddresses->IfIndex);
|
||||
printf("\tAdapter name: %s\n", pCurrAddresses->AdapterName);//*/
|
||||
|
||||
if (pCurrAddresses->OperStatus != IfOperStatusUp)
|
||||
{
|
||||
pCurrAddresses = pCurrAddresses->Next;
|
||||
continue;
|
||||
}
|
||||
|
||||
pUnicast = pCurrAddresses->FirstUnicastAddress;
|
||||
if (pUnicast != NULL) {
|
||||
// printf("\tNumber of Unicast Addresses:\n");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user