projects
/
oweals
/
mdnsd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e340a84
)
silently drop unicast questions that dont originate from port 5353
author
John Crispin
<blogic@openwrt.org>
Thu, 4 Sep 2014 15:44:46 +0000
(17:44 +0200)
committer
John Crispin
<blogic@openwrt.org>
Thu, 4 Sep 2014 15:44:46 +0000
(17:44 +0200)
Signed-off-by: John Crispin <blogic@openwrt.org>
dns.c
patch
|
blob
|
history
diff --git
a/dns.c
b/dns.c
index df855ebdeb189f86393de41eb0efef65da12765f..3f6ecbe3988614105d402564acce04fe5acb08ee 100644
(file)
--- 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;