Q: Corrupt data for services advertised with Bonjour on large setup with Windows
Hi,
We use Bonjour to advertise our service on Windows. On large setup (>50 machines), we get corrupt data for the advertised service.
More specifically, the TXT part of the message sent by mDNSResponder contains an invalid sequence: '00-00-00-00-23-...'
By compiling the available source at http://www.opensource.apple.com/source/mDNSResponder/, we realized that we were reaching the predefined amount of Cache entries (500) and that at this point, the replies from mDNSResponder were sometimes corrupt. By analysing the code, we discovered that there is no mechanism (in the Windows version!) to increase the amount of cache entries once the initial entries are all in used.
See the function CoreCallback in http://www.opensource.apple.com/source/mDNSResponder/mDNSResponder-544/mDNSWindo ws/SystemService/Service.c:
static void
CoreCallback(mDNS * const inMDNS, mStatus status)
{
if (status == mStatus_ConfigChanged)
{
SetLLRoute( inMDNS );
}
}
Ideally, it should be similar to what we can find in the Posix version (http://www.opensource.apple.com/source/mDNSResponder/mDNSResponder-544/mDNSPosix /PosixDaemon.c):
static void
CoreCallback(mDNS * const inMDNS, mStatus status){
if (status == mStatus_ConfigChanged)
{
SetLLRoute( inMDNS );
}
else if (status == mStatus_GrowCache)
{
// Allocate another chunk of cache storage
CacheEntity *storage = (CacheEntity *) malloc(sizeof(CacheEntity) * RR_CACHE_SIZE);
if (storage) mDNS_GrowCache(inMDNS, storage, RR_CACHE_SIZE)
}
}
Are there any plan to fix this issue in forecoming Bonjour version for Windows?
Thanks!
Louis
Posted on Oct 15, 2014 8:52 AM