Load service JSONs from /etc/umdns/
[project/mdnsd.git] / dns.c
diff --git a/dns.c b/dns.c
index aac1de1e5be6ef572db94a2a3d6ce603c0bdaed9..91434f20b184d2696129ecb2a3038483a9ee204e 100644 (file)
--- a/dns.c
+++ b/dns.c
@@ -367,7 +367,8 @@ parse_question(struct interface *iface, char *name, struct dns_question *q)
                break;
 
        case TYPE_PTR:
-               service_announce_services(iface, name, announce_ttl);
+               if (!strcmp(name, sdudp))
+                       service_announce_services(iface, announce_ttl);
                service_reply(iface, name, announce_ttl);
                break;
 
@@ -396,7 +397,7 @@ dns_handle_packet(struct interface *iface, struct sockaddr *s, uint16_t port, ui
        }
 
        if (h->questions && !iface->multicast && port != 5353)
-               // silently drop unicast questions that dont originate from port 5353  
+               /* silently drop unicast questions that dont originate from port 5353 */
                return;
 
        while (h->questions-- > 0) {