Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: DNS name compression and Bonjour
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DNS name compression and Bonjour



Andrew White <email@hidden> wrote:

> When the server is the linux box, I cannot parse the target field
> of the SRV record because it contains DNS compression.  I have
> verified that the mDNS packets being returned do indeed contain
> name compression on the target field.  There are two problems here:
>
> (1) SRV records are being returned with compression, which
>     contravenes RFC2782.

This was a conscious decision we made, to make mDNS more efficient. RFC
2782 prohibited name compression to accommodate older DNS implementations
that didn't know about SRV. Because SRV predates mDNS, we made the
conscious decision that all mDNS implementations should know how to
decompress SRV. We'll update the draft to make this explicit.

> (2) The mDNS library is not removing the compression before
>     returning the records to the client application.

That would be a bug, but we can't reproduce it. If you send a SIGINFO to
mDNSResponder, it will dump out its record cache to syslog:

  sudo killall -INFO mDNSResponder

When you do this, do you see valid SRV records with correct host names?
If so, then this proves that mDNSResponder *must* have decompressed the
SRV record properly -- it doesn't save the original packet, so if there
were still compression pointers in the rdata in the cache, it would have
no way to decode them.

(One last question: you're talking about multicast DNS packets here,
right? The unicast DNS code path in mDNSResponder is different, and may
have different bugs, but in that case the unicast DNS server shouldn't be
compressing the SRV in the first place, as you pointed out.)

Stuart Cheshire <email@hidden>
 * Wizard Without Portfolio, Apple Computer, Inc.
 * www.stuartcheshire.org

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Bonjour-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.