Module Name:    src
Committed By:   martin
Date:           Sun Jul 26 10:44:29 UTC 2020

Modified Files:
        src/external/apache2/mDNSResponder/dist/mDNSPosix [netbsd-9]:
            PosixDaemon.c mDNSPosix.c
        src/external/apache2/mDNSResponder/dist/mDNSShared [netbsd-9]:
            PlatformCommon.c

Log Message:
Pull up following revision(s) (requested by roy in ticket #1023):

        external/apache2/mDNSResponder/dist/mDNSShared/PlatformCommon.c: 
revision 1.6
        external/apache2/mDNSResponder/dist/mDNSPosix/mDNSPosix.c: revision 1.17
        external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c: revision 
1.13
        external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c: revision 
1.14

mdnsd: Treat EADDRNOTAVAIL as a transient error

mdnsd: starting and stopping are informational messages

mdnsd: Make the unable to parse resolv.conf message informative


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.12.4.1 \
    src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c
cvs rdiff -u -r1.16 -r1.16.2.1 \
    src/external/apache2/mDNSResponder/dist/mDNSPosix/mDNSPosix.c
cvs rdiff -u -r1.5 -r1.5.4.1 \
    src/external/apache2/mDNSResponder/dist/mDNSShared/PlatformCommon.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/PosixDaemon.c
diff -u src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c:1.12 src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c:1.12.4.1
--- src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c:1.12	Wed Apr 11 18:34:18 2018
+++ src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c	Sun Jul 26 10:44:28 2020
@@ -92,7 +92,7 @@ static void Reconfigure(mDNS *m)
     mDNS_SetPrimaryInterfaceInfo(m, NULL, NULL, NULL);
     mDNS_Lock(m);
     if (ParseDNSServers(m, uDNS_SERVERS_FILE) < 0)
-        LogMsg("Unable to parse DNS server list. Unicast DNS-SD unavailable");
+        LogInfo("Unable to parse DNS server list. Unicast DNS-SD unavailable");
     mDNS_Unlock(m);
     ReadDDNSSettingsFromConfFile(m, CONFIG_FILE, &DynDNSHostname, &DynDNSZone, NULL);
     mDNSPlatformSourceAddrForDest(&DynDNSIP, &dummy);
@@ -177,7 +177,7 @@ int main(int argc, char **argv)
 
     ParseCmdLinArgs(argc, argv);
 
-    LogMsg("%s starting", mDNSResponderVersionString);
+    LogInfo("%s starting", mDNSResponderVersionString);
 
     err = mDNS_Init(&mDNSStorage, &PlatformStorage, gRRCache, RR_CACHE_SIZE, mDNS_Init_AdvertiseLocalAddresses,
                     mDNS_StatusCallback, mDNS_Init_NoInitCallbackContext);
@@ -200,7 +200,7 @@ int main(int argc, char **argv)
     if (mStatus_NoError == err)
         err = MainLoop(&mDNSStorage);
 
-    LogMsg("%s stopping", mDNSResponderVersionString);
+    LogInfo("%s stopping", mDNSResponderVersionString);
 
     mDNS_Close(&mDNSStorage);
 

Index: src/external/apache2/mDNSResponder/dist/mDNSPosix/mDNSPosix.c
diff -u src/external/apache2/mDNSResponder/dist/mDNSPosix/mDNSPosix.c:1.16 src/external/apache2/mDNSResponder/dist/mDNSPosix/mDNSPosix.c:1.16.2.1
--- src/external/apache2/mDNSResponder/dist/mDNSPosix/mDNSPosix.c:1.16	Mon Nov 19 08:14:28 2018
+++ src/external/apache2/mDNSResponder/dist/mDNSPosix/mDNSPosix.c	Sun Jul 26 10:44:28 2020
@@ -195,8 +195,9 @@ mDNSexport mStatus mDNSPlatformSendUDP(c
     {
         static int MessageCount = 0;
         // Don't report EHOSTDOWN (i.e. ARP failure), ENETDOWN, or no route to host for unicast destinations
-        if (!mDNSAddressIsAllDNSLinkGroup(dst))
+        if (!mDNSAddressIsAllDNSLinkGroup(dst)) {
             if (errno == EHOSTDOWN || errno == ENETDOWN || errno == EHOSTUNREACH || errno == ENETUNREACH) return(mStatus_TransientErr);
+	} else if (errno == EADDRNOTAVAIL) return(mStatus_TransientErr);
 
         if (MessageCount < 1000)
         {

Index: src/external/apache2/mDNSResponder/dist/mDNSShared/PlatformCommon.c
diff -u src/external/apache2/mDNSResponder/dist/mDNSShared/PlatformCommon.c:1.5 src/external/apache2/mDNSResponder/dist/mDNSShared/PlatformCommon.c:1.5.4.1
--- src/external/apache2/mDNSResponder/dist/mDNSShared/PlatformCommon.c:1.5	Wed May  2 12:12:13 2018
+++ src/external/apache2/mDNSResponder/dist/mDNSShared/PlatformCommon.c	Sun Jul 26 10:44:28 2020
@@ -70,7 +70,11 @@ mDNSexport void mDNSPlatformSourceAddrFo
     else return;
 
     if ((connect(sock, &addr.s, inner_len)) < 0)
-    { LogMsg("mDNSPlatformSourceAddrForDest: connect %#a failed errno %d (%s)", dst, errno, strerror(errno)); goto exit; }
+    {
+        if (errno != EADDRNOTAVAIL)
+	    LogMsg("mDNSPlatformSourceAddrForDest: connect %#a failed errno %d (%s)", dst, errno, strerror(errno));
+	goto exit;
+    }
 
     if ((getsockname(sock, &addr.s, &len)) < 0)
     { LogMsg("mDNSPlatformSourceAddrForDest: getsockname failed errno %d (%s)", errno, strerror(errno)); goto exit; }

Reply via email to