Disabling mdns only for reverse lookups outside the local subnet(s) would not solve the problem. The test3.c example program uses a non-local, reserved address because that's a convenient way to illustrate that the problem is not caused by the local DNS configuration, but the actual delays I'm experiencing occur when connecting to an Ubuntu host from a non-Ubuntu system on a local subnet, for example with ssh, causing he Ubuntu host to do a reverse lookup of a local address. The standard DNS reverse lookup for that address resolves to NXDOMAIN in a few milliseconds, but since the connecting non-Ubuntu system is not running an mdns responder, the subsequent (pointless, IMO) mdns lookup takes several seconds to time out.
Disabling mdns only for reverse lookups outside the local subnet(s) would not solve the problem. The test3.c example program uses a non-local, reserved address because that's a convenient way to illustrate that the problem is not caused by the local DNS configuration, but the actual delays I'm experiencing occur when connecting to an Ubuntu host from a non-Ubuntu system on a local subnet, for example with ssh, causing he Ubuntu host to do a reverse lookup of a local address. The standard DNS reverse lookup for that address resolves to NXDOMAIN in a few milliseconds, but since the connecting non-Ubuntu system is not running an mdns responder, the subsequent (pointless, IMO) mdns lookup takes several seconds to time out.