Fix reading port of incoming packets
[project/mdnsd.git] / dns.c
diff --git a/dns.c b/dns.c
index 7c49236..b19ad17 100644 (file)
--- a/dns.c
+++ b/dns.c
@@ -373,7 +373,7 @@ parse_question(struct interface *iface, struct sockaddr *from, char *name, struc
                break;
 
        case TYPE_PTR:
-               if (!strcmp(name, sdudp)) {
+               if (!strcmp(name, C_DNS_SD)) {
                        dns_reply_a(iface, to, announce_ttl);
                        service_announce_services(iface, to, announce_ttl);
                } else {
@@ -413,7 +413,7 @@ dns_handle_packet(struct interface *iface, struct sockaddr *s, uint16_t port, ui
                return;
        }
 
-       if (h->questions && !iface->multicast && port != 5353)
+       if (h->questions && !iface->multicast && port != MCAST_PORT)
                /* silently drop unicast questions that dont originate from port 5353 */
                return;