From: Wouter Wijngaards Date: Mon, 13 Oct 2014 07:11:16 +0000 (+0000) Subject: - Fix #617: in ldns in unbound, lowercase WKS services. X-Git-Tag: release-1.5.0rc1~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=71eab23c6384dbd554961db0811361117ce7a12e;p=thirdparty%2Funbound.git - Fix #617: in ldns in unbound, lowercase WKS services. git-svn-id: file:///svn/unbound/trunk@3240 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/doc/Changelog b/doc/Changelog index 6f3ab5768..73b99194c 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,6 @@ +13 October 2014: Wouter + - Fix #617: in ldns in unbound, lowercase WKS services. + 10 October 2014: Wouter - Fix unbound-checkconf check for module config with dns64 module. - Fix unbound capsforid fallback, it ignores TTLs in comparison. diff --git a/ldns/str2wire.c b/ldns/str2wire.c index 1c4a3478c..01b1a2589 100644 --- a/ldns/str2wire.c +++ b/ldns/str2wire.c @@ -1600,6 +1600,17 @@ east: return LDNS_WIREPARSE_ERR_OK; } +static void +ldns_tolower_str(char* s) +{ + if(s) { + while(*s) { + *s = (char)tolower((unsigned char)*s); + s++; + } + } +} + int sldns_str2wire_wks_buf(const char* str, uint8_t* rd, size_t* len) { int rd_len = 1; @@ -1614,6 +1625,7 @@ int sldns_str2wire_wks_buf(const char* str, uint8_t* rd, size_t* len) return LDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL; while(sldns_bget_token(&strbuf, token, "\t\n ", sizeof(token)) > 0) { + ldns_tolower_str(token); if(!have_proto) { struct protoent *p = getprotobyname(token); have_proto = 1;