Module Name:    src
Committed By:   thorpej
Date:           Wed Dec 13 07:15:41 UTC 2023

Modified Files:
        src/external/apache2/mDNSResponder/dist/mDNSPosix: mDNSPosix.c

Log Message:
mDNSPlatformInit(): If we fail to create an IPv6 socket, ignore the
error and just continue without IPv6 support.

PR bin/57769


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 \
    src/external/apache2/mDNSResponder/dist/mDNSPosix/mDNSPosix.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/apache2/mDNSResponder/dist/mDNSPosix/mDNSPosix.c
diff -u src/external/apache2/mDNSResponder/dist/mDNSPosix/mDNSPosix.c:1.19 src/external/apache2/mDNSResponder/dist/mDNSPosix/mDNSPosix.c:1.20
--- src/external/apache2/mDNSResponder/dist/mDNSPosix/mDNSPosix.c:1.19	Tue Aug 15 00:02:16 2023
+++ src/external/apache2/mDNSResponder/dist/mDNSPosix/mDNSPosix.c	Wed Dec 13 07:15:40 2023
@@ -1324,7 +1324,16 @@ mDNSexport mStatus mDNSPlatformInit(mDNS
 #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.

Reply via email to