Skip to content

Commit

Permalink
Fix callback not being called when hostname case doesn't match
Browse files Browse the repository at this point in the history
hostnames are supposed to be case insensitive, so check whether the
requested name matches the records we receive in a case insensitive way.
  • Loading branch information
hadess committed Mar 17, 2022
1 parent 9588d7a commit ddf6e31
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/mdns.c
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,10 @@ mdns_listen_probe_network(const struct mdns_ctx *ctx, const char *const names[],
if (!strrcmp(entry->name, names[i])) {
callback(p_cookie, r, entries);
break;
} else if ((entry->type & RR_A || entry->type & RR_AAAA) &&
!strcasecmp (entry->name, names[i])) {
callback(p_cookie, r, entries);
break;
}
}
}
Expand Down

0 comments on commit ddf6e31

Please sign in to comment.