[sr-dev] git:3.1: dns: case insensitive check for NAPTR record flags

Andrei Pelinescu-Onciul andrei at iptel.org
Sat Jun 11 10:46:08 CEST 2011

Module: sip-router
Branch: 3.1
Commit: e2d6f0e3e0a3b9511f05be79d11a097a99d70eb7
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e2d6f0e3e0a3b9511f05be79d11a097a99d70eb7

Author: Andrei Pelinescu-Onciul <andrei at iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei at iptel.org>
Date:   Sat Jun 11 10:38:10 2011 +0200

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
(cherry picked from commit fa00eaf013a1787f0523559595a1a73ab469de83)


 resolve.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/resolve.c b/resolve.c
index a106315..782c15a 100644
--- a/resolve.c
+++ b/resolve.c
@@ -1017,7 +1017,7 @@ char naptr_get_sip_proto(struct naptr_rdata* n)
-	if ((n->flags_len!=1) || (*n->flags!='s'))
+	if ((n->flags_len!=1) || ((*n->flags | 0x20 )!='s'))
 		return -1;
 	if (n->regexp_len!=0)
 		return -1;

More information about the sr-dev mailing list