diff mbox

[LEDE-DEV,2/3] Fix PTR questions handling

Message ID 20170426084516.9525-2-cristian@samknows.com
State New
Delegated to: Rafał Miłecki
Headers show

Commit Message

Cristian Morales Vega April 26, 2017, 8:45 a.m. UTC
Signed-off-by: Cristian Morales Vega <cristian@samknows.com>
---
 dns.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)
diff mbox

Patch

diff --git a/dns.c b/dns.c
index 61ea8e3..168cc13 100644
--- a/dns.c
+++ b/dns.c
@@ -378,15 +378,7 @@  parse_question(struct interface *iface, struct sockaddr *from, char *name, struc
 			dns_reply_a(iface, to, announce_ttl);
 			service_announce_services(iface, to, announce_ttl);
 		} else {
-			/* First dot separates instance name from the rest */
-			char *dot = strchr(name, '.');
-			/* Length of queried instance */
-			size_t len = dot ? dot - name : 0;
-
-			/* Make sure it's query for the instance name we use */
-			if (len && len == strlen(mdns_hostname) &&
-			    !strncmp(name, mdns_hostname, len))
-				service_reply(iface, to, dot + 1, announce_ttl);
+			service_reply(iface, to, name, announce_ttl);
 		}
 		break;