]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix #617: in ldns in unbound, lowercase WKS services.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 13 Oct 2014 07:11:16 +0000 (07:11 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 13 Oct 2014 07:11:16 +0000 (07:11 +0000)
git-svn-id: file:///svn/unbound/trunk@3240 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
ldns/str2wire.c

index 6f3ab576809f3a597dbba3c8b03a592f346cc003..73b99194c1441a3dccda26794a16dcf04abb0c11 100644 (file)
@@ -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.
index 1c4a3478c7fb1bc812bf597f948a5f25a164b32f..01b1a2589a460f7baaeb250809c175f3dd3961fb 100644 (file)
@@ -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;