Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/apache2/mDNSResponder/dist mdnsd: Treat EADDRNOTAVA...



details:   https://anonhg.NetBSD.org/src/rev/564d4bf10954
branches:  trunk
changeset: 936216:564d4bf10954
user:      roy <roy%NetBSD.org@localhost>
date:      Tue Jul 21 14:04:07 2020 +0000

description:
mdnsd: Treat EADDRNOTAVAIL as a transient error

diffstat:

 external/apache2/mDNSResponder/dist/mDNSPosix/mDNSPosix.c       |  3 ++-
 external/apache2/mDNSResponder/dist/mDNSShared/PlatformCommon.c |  6 +++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diffs (30 lines):

diff -r 461a4c0bc4ad -r 564d4bf10954 external/apache2/mDNSResponder/dist/mDNSPosix/mDNSPosix.c
--- a/external/apache2/mDNSResponder/dist/mDNSPosix/mDNSPosix.c Tue Jul 21 13:37:18 2020 +0000
+++ b/external/apache2/mDNSResponder/dist/mDNSPosix/mDNSPosix.c Tue Jul 21 14:04:07 2020 +0000
@@ -195,8 +195,9 @@
     {
         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)
         {
diff -r 461a4c0bc4ad -r 564d4bf10954 external/apache2/mDNSResponder/dist/mDNSShared/PlatformCommon.c
--- a/external/apache2/mDNSResponder/dist/mDNSShared/PlatformCommon.c   Tue Jul 21 13:37:18 2020 +0000
+++ b/external/apache2/mDNSResponder/dist/mDNSShared/PlatformCommon.c   Tue Jul 21 14:04:07 2020 +0000
@@ -70,7 +70,11 @@
     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; }



Home | Main Index | Thread Index | Old Index