[sr-dev] git:master: dns cache: fix dns_cache_delete_single_record()

Miklos Tirpak miklos at iptel.org
Wed Jun 30 14:46:59 CEST 2010


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

Author: Miklos Tirpak <miklos at iptel.org>
Committer: Miklos Tirpak <miklos at iptel.org>
Date:   Wed Jun 30 10:21:24 2010 +0200

dns cache: fix dns_cache_delete_single_record()

Binary comparison is needed to check the flags.

---

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

diff --git a/dns_cache.c b/dns_cache.c
index a501e3e..7d52c2c 100644
--- a/dns_cache.c
+++ b/dns_cache.c
@@ -4539,7 +4539,7 @@ int dns_cache_delete_single_record(unsigned short type,
 	)
 		goto not_found;
 
-	if (flags && DNS_FLAG_BAD_NAME) /* negative record, there is no value */
+	if (flags & DNS_FLAG_BAD_NAME) /* negative record, there is no value */
 		goto delete;
 
 	/* check whether there is an rr with the same value */




More information about the sr-dev mailing list