]> git.saurik.com Git - apple/mdnsresponder.git/commitdiff
mDNSResponder-258.14.tar.gz mac-os-x-1066 v258.14
authorApple <opensource@apple.com>
Thu, 18 Nov 2010 01:06:12 +0000 (01:06 +0000)
committerApple <opensource@apple.com>
Thu, 18 Nov 2010 01:06:12 +0000 (01:06 +0000)
Makefile
mDNSCore/mDNS.c
mDNSShared/dns_sd.h

index d112435da49d027b4245796a8d1e95a0115d4833..89f009de09869e99e0708feb3706c57db094abbb 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,7 @@
 
 include /Developer/Makefiles/pb_makefiles/platform.make
 
-MVERS = "mDNSResponder-258.13"
+MVERS = "mDNSResponder-258.14"
 
 DDNSWRITECONFIG = "$(DSTROOT)/Library/Application Support/Bonjour/ddnswriteconfig"
 
index 3b69ecc49a1daaf14d8cc9081738500b4ad7eccc..91f37de66cb98e68931d9248d0cf9a72c5706d65 100755 (executable)
@@ -2858,6 +2858,15 @@ mDNSexport void AnswerCurrentQuestionWithResourceRecord(mDNS *const m, CacheReco
                        mDNS_StopQuery_internal(m, q);                                                          // Stop old query
                        AssignDomainName(&q->qname, &rr->resrec.rdata->u.name);         // Update qname
                        q->qnamehash = DomainNameHashValue(&q->qname);                          // and namehash
+                       // If a unicast query results in a CNAME that points to a .local, we need to re-try
+                       // this as unicast. Setting the mDNSInterface_Unicast tells mDNS_StartQuery_internal
+                       // to try this as unicast query even though it is a .local name
+                       if (!mDNSOpaque16IsZero(q->TargetQID) && IsLocalDomain(&q->qname))
+                               {
+                               LogInfo("AnswerCurrentQuestionWithResourceRecord: Resolving a .local CNAME %p %##s (%s) CacheRecord %s",
+                                       q, q->qname.c, DNSTypeName(q->qtype), CRDisplayString(m, rr));
+                               q->InterfaceID = mDNSInterface_Unicast;
+                               }
                        mDNS_StartQuery_internal(m, q);                                                         // start new query
                        // Record how many times we've done this. We need to do this *after* mDNS_StartQuery_internal,
                        // because mDNS_StartQuery_internal re-initializes CNAMEReferrals to zero
@@ -7067,7 +7076,7 @@ mDNSlocal mDNSBool ShouldSuppressQuery(mDNS *const m, domainname *qname, mDNSu16
        // We still want the ability to be able to listen to the local services and hence
        // don't fail .local requests. We always have a loopback interface which we don't
        // check here.
-       if (IsLocalDomain(qname)) { LogInfo("ShouldSuppressQuery: Query not suppressed for %##s, qtype %s, Local question", qname, DNSTypeName(qtype)); return mDNSfalse; }
+       if (InterfaceID != mDNSInterface_Unicast && IsLocalDomain(qname)) { LogInfo("ShouldSuppressQuery: Query not suppressed for %##s, qtype %s, Local question", qname, DNSTypeName(qtype)); return mDNSfalse; }
 
        // Skip Private domains as we have special addresses to get the hosts in the Private domain
        AuthInfo = GetAuthInfoForName_internal(m, qname);
@@ -7083,7 +7092,7 @@ mDNSlocal mDNSBool ShouldSuppressQuery(mDNS *const m, domainname *qname, mDNSu16
                if (i->ip.type != iptype) continue;
 
                if (!InterfaceID || (InterfaceID == mDNSInterface_LocalOnly) || (InterfaceID == mDNSInterface_P2P) ||
-                       (i->InterfaceID == InterfaceID))
+                       (InterfaceID == mDNSInterface_Unicast) || (i->InterfaceID == InterfaceID))
                        {
                        if (iptype == mDNSAddrType_IPv4 && !mDNSv4AddressIsLoopback(&i->ip.ip.v4) && !mDNSv4AddressIsLinkLocal(&i->ip.ip.v4))
                                {
index 2ed91f08e59036a421ecefe5fa8f6e540ed25ad5..7632a2292c61b550df859f747ac17bda1061ea93 100644 (file)
@@ -77,7 +77,7 @@
  */
 
 #ifndef _DNS_SD_H
-#define _DNS_SD_H 2581300
+#define _DNS_SD_H 2581400
 
 #ifdef  __cplusplus
     extern "C" {