Browse code

dns: case insensitive check for NAPTR record flags

The NAPTR records flags where not checked in case insensitive
mode. Records with the 'S' flags where ignored ('s' was expected).

Closes: FS#135
Reported-by: Inaki Baz Castillo ibc aliax net

Andrei Pelinescu-Onciul authored on 11/06/2011 08:38:10
Showing 1 changed files
... ...
@@ -1017,7 +1017,7 @@ char naptr_get_sip_proto(struct naptr_rdata* n)
1017 1017
 
1018 1018
 	proto=-1;
1019 1019
 	
1020
-	if ((n->flags_len!=1) || (*n->flags!='s'))
1020
+	if ((n->flags_len!=1) || ((*n->flags | 0x20 )!='s'))
1021 1021
 		return -1;
1022 1022
 	if (n->regexp_len!=0)
1023 1023
 		return -1;