kpa said:
There's now an updated
net/mDNSResponderand also a new port of
dns/nss_mDNSResponderto hook up mDNS to nsswitch.conf(5). The first one seems to work now with IPv6 just fine. Time to ditch avahi for good.
After reading your post, I gave it another try on my setup, and it still throws a bunch of ipv6 related errors on startup (see below). I am on FreeBSD RELEASE-9.3.
Issue #1 is, that mDNSResponder addresses the members
of a bridge interface
bridge0.
Issue #2 is, that it fails to register the exact IPv6 address of the
because it doesn't receive the correct net mask from the system.
Issue #3 is, that it finds that the Addr and Ptr of server.local are already present somewhere in the system.
I fixed Issue #1 by adding a new command-line option to
mDNSResponderPosix:
Code:
Usage: mDNSResponderPosix [-v level ] [-r] [-n name] [-i iface] [-t type] [-d domain] [-p port] [-f file] [-b] [-P pidfile] [-x name=val ...]... -i only binds to the interface 'iface'...
With that the command mDNSResponderPosix -i bridge0 -f /path/to/mDNSServices.conf
lets
bind to the given interface only -- in this case my LAN interface
bridge0, and therefore, it simply ignores
em0,em1as it ignores any other interface in the system. Another benefit of this is, that it ignores also the WAN interface from now on. I never liked it so much, that
mDNSResponderPosixtries to announce the services over any possible channel to everybody in the world.
I fixed MY Issue #2 by disabling the corresponding sanity check in
mDNSCore/mDNS.c. This is of course not the correct solution, but I was not able to get to the source of the problem, since it seems that mDNSResponder receives the zero mask by a system call. However, for the time being this quick-fix allows the IPv6 address of
bridge0being correctly announced. The net mask isn't passed anyway into the mDNS records.
For Issue #3, I did not find a solution. Attached to this message is a patch file with the fixes for issues #1 and #2. In order to apply said fixes, put this file into
/usr/ports/net/mDNSResponder/files/, and re-install
net/mDNSResponder. For re-moving the fixes, delete the patch file from
/usr/ports/net/mDNSResponder/files/, and re-install and restart again: portmaster net/mDNSResponder
service mdnsresponderposix stop
service mdnsresponderposix start
From
/var/log/messagewhen starting up
mDNSResponderPosix:
Code:
Aug 21 20:14:59 server mDNSResponderPosix: mDNS_RegisterInterface: Error! Tried to register a NetworkInterfaceInfo FD7D:40EA:7B49:4A0B:0000:0000:0000:0001 with invalid mask «ZERO ADDRESS»Aug 21 20:14:59 server mDNSResponderPosix: mDNS_Register_internal: ERROR!! Tried to register AuthRecord 0000000800C2FD60 server.local. (Addr) that's already in the listAug 21 20:14:59 server mDNSResponderPosix: mDNS_Register_internal: ERROR!! Tried to register AuthRecord 0000000800C30180 99.51.47.102.in-addr.arpa. (PTR) that's already in the listAug 21 20:14:59 server mDNSResponderPosix: mDNS_Register_internal: ERROR!! Tried to register AuthRecord 0000000800C31D60 server.local. (Addr) that's already in the listAug 21 20:14:59 server mDNSResponderPosix: mDNS_Register_internal: ERROR!! Tried to register AuthRecord 0000000800C32180 1.0.168.192.in-addr.arpa. (PTR) that's already in the listAug 21 20:14:59 server mDNSResponderPosix: mDNS_Register_internal: ERROR!! Tried to register AuthRecord 0000000800C33D60 server.local. (AAAA) that's already in the listAug 21 20:14:59 server mDNSResponderPosix: mDNS_Register_internal: ERROR!! Tried to register AuthRecord 0000000800C34180 4.3.5.6.7.6.B.F.F.F.A.0.1.1.2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.E.F.ip6.arpa. (PTR) that's already in the listAug 21 20:14:59 server mDNSResponderPosix: mDNS_Register_internal: ERROR!! Tried to register AuthRecord 0000000800C35D60 server.local. (AAAA) that's already in the listAug 21 20:14:59 server mDNSResponderPosix: mDNS_Register_internal: ERROR!! Tried to register AuthRecord 0000000800C36180 5.3.5.6.7.6.B.F.F.F.A.0.1.1.2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.E.F.ip6.arpa. (PTR) that's already in the listAug 21 20:15:00 server mDNSResponderPosix: mDNSPlatformSendUDP got error 50 (Network is down) sending packet to FF02:0000:0000:0000:0000:0000:0000:00FB on interface FE80:0000:0000:0000:0211:0AFF:FB67:6534/em0/7Aug 21 20:15:00 server mDNSResponderPosix: mDNSPlatformSendUDP got error 50 (Network is down) sending packet to FF02:0000:0000:0000:0000:0000:0000:00FB on interface FE80:0000:0000:0000:0211:0AFF:FB67:6535/em1/8Aug 21 20:15:00 server mDNSResponderPosix: mDNSPlatformSendUDP got error 50 (Network is down) sending packet to FF02:0000:0000:0000:0000:0000:0000:00FB on interface FE80:0000:0000:0000:0211:0AFF:FB67:6534/em0/7Aug 21 20:15:00 server mDNSResponderPosix: mDNSPlatformSendUDP got error 50 (Network is down) sending packet to FF02:0000:0000:0000:0000:0000:0000:00FB on interface FE80:0000:0000:0000:0211:0AFF:FB67:6535/em1/8Aug 21 20:15:00 server mDNSResponderPosix: mDNSPlatformSendUDP got error 50 (Network is down) sending packet to FF02:0000:0000:0000:0000:0000:0000:00FB on interface FE80:0000:0000:0000:0211:0AFF:FB67:6534/em0/7Aug 21 20:15:00 server mDNSResponderPosix: mDNSPlatformSendUDP got error 50 (Network is down) sending packet to FF02:0000:0000:0000:0000:0000:0000:00FB on interface FE80:0000:0000:0000:0211:0AFF:FB67:6535/em1/8Aug 21 20:15:01 server mDNSResponderPosix: mDNSPlatformSendUDP got error 50 (Network is down) sending packet to FF02:0000:0000:0000:0000:0000:0000:00FB on interface FE80:0000:0000:0000:0211:0AFF:FB67:6534/em0/7Aug 21 20:15:01 server mDNSResponderPosix: mDNSPlatformSendUDP got error 50 (Network is down) sending packet to FF02:0000:0000:0000:0000:0000:0000:00FB on interface FE80:0000:0000:0000:0211:0AFF:FB67:6535/em1/8Aug 21 20:15:02 server mDNSResponderPosix: mDNSPlatformSendUDP got error 50 (Network is down) sending packet to FF02:0000:0000:0000:0000:0000:0000:00FB on interface FE80:0000:0000:0000:0211:0AFF:FB67:6534/em0/7Aug 21 20:15:02 server mDNSResponderPosix: mDNSPlatformSendUDP got error 50 (Network is down) sending packet to FF02:0000:0000:0000:0000:0000:0000:00FB on interface FE80:0000:0000:0000:0211:0AFF:FB67:6533/em1/8Aug 21 20:15:04 server mDNSResponderPosix: mDNSPlatformSendUDP got error 50 (Network is down) sending packet to FF02:0000:0000:0000:0000:0000:0000:00FB on interface FE80:0000:0000:0000:0211:0AFF:FB67:6534/em0/7Aug 21 20:15:04 server mDNSResponderPosix: mDNSPlatformSendUDP got error 50 (Network is down) sending packet to FF02:0000:0000:0000:0000:0000:0000:00FB on interface FE80:0000:0000:0000:0211:0AFF:FB67:6535/em1/8