Reply To: mt-daapd sez: *** WARNING: Received 5 packets…

#3876
Gonzo
Participant

Hi Ron,

thanks for your answer.

Patches, please.

Sorry, ’twas a late night post. Here’s what I did:

In src/mDNSUNP.h:

66a67
> #include

—-
In src/mDNSUNP.c:

180c180
< DPRINTF(E_DBG,L_REND,"intf %d name=%s AF=%d, flags=%08xn", index, ifr->ifr_name, ifr->ifr_addr.sa_family,ifr->ifr_flags);

> DPRINTF(E_DBG,L_REND,”intf %d name=%s AF=%d, flags=%08xn”, ifr->ifr_addr, ifr->ifr_name, ifr->ifr_addr.sa_family,ifr->ifr_flags);

—-
In src/scan-xml.c:

115a116,122
> /**
> * Replace the Linuxish timegm function.
> * Addded by Constantin Gonzalez 20051127
> */
> time_t timegm (struct tm *tm) {
> time_t ret;
> char *tz;
116a124,135
> tz = getenv(“TZ”);
> setenv(“TZ”, “”, 1);
> tzset();
> ret = mktime(tm);
> if (tz)
> setenv(“TZ”, tz, 1);
> else
> unsetenv(“TZ”);
> tzset();
> return ret;
> }
>
122a142
>

(I found this piece of code in a Linux timgm man page, it was recommended there as the platform independent way of implementing this function.)

—-
In src/mDNSClientAPI.h:

434a435
> #include
531c532
< typedef u_int32_t mDNSu32;

> typedef uint32_t mDNSu32;

That’s it and now it compiles on Solaris 10 (actually, I’m using Nevada b27a, but that’s 100% compatible).

It means that it’s receiving queries on interfaces other than the interface that it’s advertised on. Multihomed box, maybe?

Nope, I only have lo0 as the loopback interface and bge0 as my GigE main one.

If it is a multihome problem, you can try and force which interface it binds to using the “interface” configuration option. It may or may not work, though, as I don’t have a multi-homed machine to try it on, nor a solaris machine, obviously.

Hard-wiring the interface to bge0 didn’t change anything. Probably the mDNS code is broken in a way I don’t understand.

Getting a Solaris machine is very easy: Just download Solaris 10 (or better the current development build of Nevada) from either http://www.sun.com/solaris or from http://www.opensolaris.org. Then install on your favourite PC. It’s really that easy.

Disappearing machine is probably related. If it’s ignoring mdns queries, it will eventually drop off iTunes (and soundbridge).

Probably the best solution would be to use howl as a mdns responder, and compile with “–enable-howl –with-howl-includes=/usr/local/howl-0.9.8” (or whatever).

Yeah, I just installed Howl, compiled with Howl support, configured the Howl mDNSResponder and it now works just fine. Seems like Howl is the way to go, but it’s probably not as easy to setup for everyone than just compiling and installing standalone mt-daapd…

Thanks!

Gonzo