fix DNS resolution to not case insensitivity

See patch #9654

Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
This commit is contained in:
armink 2018-06-10 08:12:32 +02:00 committed by Simon Goldschmidt
parent 8e23b8d903
commit 66f7f06601

View File

@ -96,6 +96,7 @@
#include "lwip/prot/dns.h" #include "lwip/prot/dns.h"
#include <string.h> #include <string.h>
#include <ctype.h>
/** Random generator function to create random TXIDs and source ports for queries */ /** Random generator function to create random TXIDs and source ports for queries */
#ifndef DNS_RAND_TXID #ifndef DNS_RAND_TXID
@ -666,7 +667,7 @@ dns_compare_name(const char *query, struct pbuf *p, u16_t start_offset)
if (c < 0) { if (c < 0) {
return 0xFFFF; return 0xFFFF;
} }
if ((*query) != (u8_t)c) { if (tolower((*query)) != tolower((u8_t)c)) {
return 0xFFFF; return 0xFFFF;
} }
if (response_offset == 0xFFFF) { if (response_offset == 0xFFFF) {