Skip to content

Commit ddf6e31

Browse files
committed
Fix callback not being called when hostname case doesn't match
hostnames are supposed to be case insensitive, so check whether the requested name matches the records we receive in a case insensitive way.
1 parent 9588d7a commit ddf6e31

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/mdns.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -767,6 +767,10 @@ mdns_listen_probe_network(const struct mdns_ctx *ctx, const char *const names[],
767767
if (!strrcmp(entry->name, names[i])) {
768768
callback(p_cookie, r, entries);
769769
break;
770+
} else if ((entry->type & RR_A || entry->type & RR_AAAA) &&
771+
!strcasecmp (entry->name, names[i])) {
772+
callback(p_cookie, r, entries);
773+
break;
770774
}
771775
}
772776
}

0 commit comments

Comments
 (0)