diff options
| author | John Crispin | 2014-09-04 15:44:46 +0000 |
|---|---|---|
| committer | John Crispin | 2014-09-04 15:44:46 +0000 |
| commit | d5c478a29fb101cdb921741a035d6d176a6ffb0f (patch) | |
| tree | d8fbeb6267f5498f4e8ad2c624536ce110d3ab15 | |
| parent | e340a84950686428ecc7f46dbe28eba5c39a9095 (diff) | |
| download | mdnsd-d5c478a29fb101cdb921741a035d6d176a6ffb0f.tar.gz | |
silently drop unicast questions that dont originate from port 5353
Signed-off-by: John Crispin <blogic@openwrt.org>
| -rw-r--r-- | dns.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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; |