mDNSPlatformInit(): If we fail to create an IPv6 socket, ignore the

error and just continue without IPv6 support.

PR bin/57769
pull/20/head
thorpej 2023-12-13 07:15:40 +00:00
parent 5fcb500928
commit 86e7016815
1 changed files with 10 additions and 1 deletions

View File

@ -1324,7 +1324,16 @@ mDNSexport mStatus mDNSPlatformInit(mDNS *const m)
#if HAVE_IPV6
sa.sa_family = AF_INET6;
m->p->unicastSocket6 = -1;
if (err == mStatus_NoError) err = SetupSocket(&sa, zeroIPPort, 0, &m->p->unicastSocket6);
if (err == mStatus_NoError)
{
err = SetupSocket(&sa, zeroIPPort, 0, &m->p->unicastSocket6);
if (err != mStatus_NoError)
{
// Ignore errors configuring IPv6.
m->p->unicastSocket6 = -1;
err = mStatus_NoError;
}
}
#endif
// Tell mDNS core about the network interfaces on this machine.