From: John Crispin Date: Thu, 4 Sep 2014 15:44:46 +0000 (+0200) Subject: silently drop unicast questions that dont originate from port 5353 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=d5c478a29fb101cdb921741a035d6d176a6ffb0f;p=oweals%2Fmdnsd.git silently drop unicast questions that dont originate from port 5353 Signed-off-by: John Crispin --- diff --git a/dns.c b/dns.c index df855eb..3f6ecbe 100644 --- a/dns.c +++ b/dns.c @@ -359,6 +359,10 @@ dns_handle_packet(struct interface *iface, struct sockaddr *s, uint16_t port, ui return; } + if (h->questions && !iface->multicast && port != 5353) + // silently drop unicast questions that dont originate from port 5353 + return; + while (h->questions-- > 0) { char *name = dns_consume_name(buffer, len, &b, &rlen); struct dns_question *q;