Send A in response to service discovery
authorRafał Miłecki <rafal@milecki.pl>
Wed, 15 Feb 2017 10:17:04 +0000 (11:17 +0100)
committerRafał Miłecki <rafal@milecki.pl>
Wed, 15 Feb 2017 10:18:13 +0000 (11:18 +0100)
This allows other mdns software to discover our hostname when they
start.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
dns.c

diff --git a/dns.c b/dns.c
index 4c3dbf92f6c1e4598d5e07d39ea91b351ad5e190..cf9e29b834659ea972c172e3506e340a9ad38048 100644 (file)
--- a/dns.c
+++ b/dns.c
@@ -374,6 +374,7 @@ parse_question(struct interface *iface, struct sockaddr *from, char *name, struc
 
        case TYPE_PTR:
                if (!strcmp(name, sdudp)) {
+                       dns_reply_a(iface, to, announce_ttl);
                        service_announce_services(iface, to, announce_ttl);
                } else {
                        /* First dot separates instance name from the rest */