bind9/lib/dns
Michał Kępień 814da1c808 Properly detect MMDB lookup failures
Only comparing the value of the integer passed as the last argument to
MMDB_lookup_sockaddr() against MMDB_SUCCESS is not enough to ensure that
an MMDB lookup was successful - the 'found_entry' field of the
MMDB_lookup_result_s structure returned by that function also needs to
be true or else the remaining contents of that structure should be
ignored as the lookup failed.  Extend the relevant logical condition in
get_entry_for() to ensure the latter does not return incorrect MMDB
entries for IP addresses which do not belong to any subnet defined in a
given GeoIP2 database.

(cherry picked from commit ec8334fb74)
2020-01-13 14:36:58 +01:00
..
include Change the (acl)->node_count macro to dns_acl_node_count(acl) macro to clean the global namespace 2019-12-18 11:11:31 +11:00
rdata lib/dns/rdata/*/*.c: Silence false positive nullPointerRedundantCheck warning from Cppcheck 2019-10-03 09:50:26 +02:00
tests Properly detect MMDB lookup failures 2020-01-13 14:36:58 +01:00
win32 Split dns_name_copy() into dns_name_copy() and dns_name_copynf() 2019-10-04 14:08:25 +10:00
.gitignore 4394. [func] Add rndc command "dnstap-reopen" to close and 2016-06-24 09:37:04 +10:00
acl.c Change the (acl)->node_count macro to dns_acl_node_count(acl) macro to clean the global namespace 2019-12-18 11:11:31 +11:00
adb.c Describe the polynomial backoff curve used in the quota adjustment 2019-11-05 11:06:04 +01:00
api prep 9.14.9 2019-12-12 06:09:19 +00:00
badcache.c - Make isc_mutex_destroy return void 2018-11-22 11:52:08 +00:00
byaddr.c force promotion to unsigned int 2019-03-14 13:51:30 -07:00
cache.c - Make isc_mutex_destroy return void 2018-11-22 11:52:08 +00:00
callbacks.c Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 13:17:46 +02:00
catz.c declarations before assertions 2019-02-18 17:40:56 -05:00
client.c libdns: Remove useless checks for ISC_R_MEMORY, which cannot happen now 2019-11-05 09:48:50 +01:00
clientinfo.c Replace "config.h" with <config.h> 2018-08-16 12:45:59 +02:00
compress.c Remove duplicate config.h 2018-08-08 09:37:30 +02:00
db.c QNAME miminimization should create a separate fetch context for each fetch - 2018-10-23 12:15:04 +00:00
dbiterator.c Replace custom isc_boolean_t with C standard bool type 2018-08-08 09:37:30 +02:00
dbtable.c - Make isc_mutex_destroy return void 2018-11-22 11:52:08 +00:00
diff.c Hint the compiler with ISC_UNREACHABLE(); that code after INSIST(0); cannot be reached 2018-11-08 12:22:17 +07:00
dispatch.c move maxbuffers test to allocate_udp_buffer 2019-11-26 11:53:19 +11:00
dlz.c Replace custom isc_boolean_t with C standard bool type 2018-08-08 09:37:30 +02:00
dns64.c Replace custom isc_boolean_t with C standard bool type 2018-08-08 09:37:30 +02:00
dnsrps.c Replace RUNTIME_CHECK(dns_name_copy(..., NULL)) with dns_name_copynf() 2019-10-04 14:08:26 +10:00
dnssec.c address or suppress cppcheck warnings 2019-09-12 19:27:28 +10:00
dnstap.c attach memory context sooner so that cleanup will work correctly 2019-04-26 15:53:48 -07:00
dnstap.proto extend DNSTAP to record UPDATE requests and responses as a separate type 2018-10-03 01:03:56 -07:00
ds.c cleanup: use dns_secalg_t and dns_dsdigest_t where appropriate 2019-03-08 22:16:48 +11:00
dst_api.c address or suppress cppcheck warnings 2019-09-12 19:27:28 +10:00
dst_internal.h Remove internal dst memory context that was used just for OpenSSL and was passthrough for malloc and free 2018-10-25 08:16:24 +02:00
dst_openssl.h Use standard OPENSSL_NO_ENGINE instead of custom USE_ENGINE define 2018-05-03 15:32:43 +02:00
dst_parse.c Remove RSAMD5 support 2018-12-11 11:32:24 +01:00
dst_parse.h Remove RSAMD5 support 2018-12-11 11:32:24 +01:00
dst_pkcs11.h Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
dst_result.c Remove message catalogs 2019-01-09 23:44:26 +01:00
dyndb.c gcc defines __SANITIZE_ADDRESS__ and not __ADDRESS_SANITIZER__, use the correct #define 2018-12-19 12:24:59 +01:00
ecdb.c Remove randomly scattered additional style check suppressions that caused unmatchedSuppression 2019-10-03 09:50:27 +02:00
ecs.c Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
fixedname.c Add a dns_fixedname_initname() helper function 2018-04-09 12:14:16 +02:00
forward.c Replace custom isc_boolean_t with C standard bool type 2018-08-08 09:37:30 +02:00
gen-unix.h Exit the ./gen program on failed readdir() call 2019-05-29 10:30:39 +02:00
gen-win32.h Replace custom isc_boolean_t with C standard bool type 2018-08-08 09:37:30 +02:00
gen.c remove duplicate #includes 2019-12-23 08:20:35 +11:00
geoip.c Add couple more ISC_UNREACHABLE(); found thanks to coccinelle 2018-11-22 09:28:00 -05:00
geoip2.c Properly detect MMDB lookup failures 2020-01-13 14:36:58 +01:00
gssapi_link.c lib/dns/gssapi_link.c: Fix %d -> %u formatting when printing unsigned integers 2019-10-03 09:50:26 +02:00
gssapictx.c remove redundant assignment 2019-02-18 17:40:56 -05:00
hmac_link.c Hint the compiler with ISC_UNREACHABLE(); that code after INSIST(0); cannot be reached 2018-11-08 12:22:17 +07:00
ipkeylist.c Replace custom isc_u?intNN_t types with C99 u?intNN_t types 2018-08-08 09:37:28 +02:00
iptable.c Add small tweaks to the code to fix compilation when ISC assertions are disabled 2018-11-08 12:21:53 +07:00
journal.c Replace RUNTIME_CHECK(dns_name_copy(..., NULL)) with dns_name_copynf() 2019-10-04 14:08:26 +10:00
key.c Revert "Merge branch '996-wrong-key-id-is-displayed-for-rsamd5-keys' into 'master'" 2019-05-30 14:32:58 +02:00
keydata.c Replace custom isc_u?intNN_t types with C99 u?intNN_t types 2018-08-08 09:37:28 +02:00
keytable.c Refactor *_destroy and *_detach functions to unified order of actions. 2018-08-28 13:15:59 +02:00
Kyuafile regen master 2017-12-29 01:44:18 +00:00
lib.c Remove message catalogs 2019-01-09 23:44:26 +01:00
log.c Move NSID logging to its own category 2018-06-05 12:10:37 +10:00
lookup.c Replace RUNTIME_CHECK(dns_name_copy(..., NULL)) with dns_name_copynf() 2019-10-04 14:08:26 +10:00
Makefile.in add a search for GeoIP2 libraries in configure 2019-06-27 16:25:28 -07:00
mapapi begin preparation for 9.13.0 2018-05-21 11:50:38 -07:00
master.c Set 'specials' to match 'specials' in 'lib/dns/master.c' 2019-04-11 19:47:43 +10:00
masterdump.c Replace RUNTIME_CHECK(dns_name_copy(..., NULL)) with dns_name_copynf() 2019-10-04 14:08:26 +10:00
message.c Fix the constification of the dns_name_t * result variable for dns_tsig_identity() 2019-10-03 09:50:25 +02:00
name.c Split dns_name_copy() into dns_name_copy() and dns_name_copynf() 2019-10-04 14:08:25 +10:00
ncache.c allow for up 100 records or 64K of data to be in a ncache entry 2019-01-09 15:53:32 +11:00
nsec.c address or suppress cppcheck warnings 2019-09-12 19:27:28 +10:00
nsec3.c Replace RUNTIME_CHECK(dns_name_copy(..., NULL)) with dns_name_copynf() 2019-10-04 14:08:26 +10:00
nta.c Replace RUNTIME_CHECK(dns_name_copy(..., NULL)) with dns_name_copynf() 2019-10-04 14:08:26 +10:00
openssl_link.c - Make isc_mutex_destroy return void 2018-11-22 11:52:08 +00:00
openssldh_link.c Remove randomly scattered additional style check suppressions that caused unmatchedSuppression 2019-10-03 09:50:27 +02:00
opensslecdsa_link.c Add generic message digest API (isc_md) to replace specific MD functions md5/sha1/sha256 2018-10-25 08:15:42 +02:00
openssleddsa_link.c fix Ed448 length values for precomputed ASN.1 prefix blobs 2019-05-30 23:09:23 +10:00
opensslrsa_link.c Remove randomly scattered additional style check suppressions that caused unmatchedSuppression 2019-10-03 09:50:27 +02:00
order.c Replace RUNTIME_CHECK(dns_name_copy(..., NULL)) with dns_name_copynf() 2019-10-04 14:08:26 +10:00
peer.c Hint the compiler with ISC_UNREACHABLE(); that code after INSIST(0); cannot be reached 2018-11-08 12:22:17 +07:00
pkcs11.c Make OpenSSL mandatory 2018-07-19 12:47:03 -04:00
pkcs11ecdsa_link.c Make sure null atributes are never used 2019-01-16 15:48:37 -05:00
pkcs11eddsa_link.c Add generic message digest API (isc_md) to replace specific MD functions md5/sha1/sha256 2018-10-25 08:15:42 +02:00
pkcs11rsa_link.c Make sure null atributes are never used 2019-01-16 15:48:37 -05:00
portlist.c - Make isc_mutex_destroy return void 2018-11-22 11:52:08 +00:00
private.c Turn (int & flag) into (int & flag) != 0 when implicitly typed to bool 2018-11-08 12:21:53 +07:00
rbt.c Replace RUNTIME_CHECK(dns_name_copy(..., NULL)) with dns_name_copynf() 2019-10-04 14:08:26 +10:00
rbtdb.c address deadlock introduced in cd2469d3cd 2019-12-10 23:38:53 +11:00
rbtdb.h Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 13:17:46 +02:00
rcode.c Remove randomly scattered additional style check suppressions that caused unmatchedSuppression 2019-10-03 09:50:27 +02:00
rdata.c lib/dns/rdata.c: Silence false positive nullPointerRedundantCheck warning from Cppcheck 2019-10-03 09:50:26 +02:00
rdatalist.c lib/dns/rdatalist.c: Fix dereference before DbC check 2019-10-03 09:50:26 +02:00
rdatalist_p.h Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 13:17:46 +02:00
rdataset.c Replace RUNTIME_CHECK(dns_name_copy(..., NULL)) with dns_name_copynf() 2019-10-04 14:08:26 +10:00
rdatasetiter.c Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 13:17:46 +02:00
rdataslab.c Replace custom isc_boolean_t with C standard bool type 2018-08-08 09:37:30 +02:00
request.c - Make isc_mutex_destroy return void 2018-11-22 11:52:08 +00:00
resolver.c make resolver->zspill atomic to prevent potential deadlock 2019-12-12 20:22:22 +11:00
result.c Remove message catalogs 2019-01-09 23:44:26 +01:00
rootns.c Replace custom isc_boolean_t with C standard bool type 2018-08-08 09:37:30 +02:00
rpz.c use rpzs->updater as rpz->rpzs is NULL 2019-09-05 07:29:05 +10:00
rriterator.c Replace custom isc_u?intNN_t types with C99 u?intNN_t types 2018-08-08 09:37:28 +02:00
rrl.c Replace RUNTIME_CHECK(dns_name_copy(..., NULL)) with dns_name_copynf() 2019-10-04 14:08:26 +10:00
sdb.c Replace RUNTIME_CHECK(dns_name_copy(..., NULL)) with dns_name_copynf() 2019-10-04 14:08:26 +10:00
sdlz.c Replace RUNTIME_CHECK(dns_name_copy(..., NULL)) with dns_name_copynf() 2019-10-04 14:08:26 +10:00
soa.c Replace custom isc_u?intNN_t types with C99 u?intNN_t types 2018-08-08 09:37:28 +02:00
spnego.asn1 Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 13:17:46 +02:00
spnego.c Remove duplicate config.h 2018-08-08 09:37:30 +02:00
spnego.h Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 13:17:46 +02:00
spnego_asn1.c Suppress cppcheck 1.89 false positive 2019-10-17 10:52:19 +02:00
spnego_asn1.pl Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 13:17:46 +02:00
ssu.c - Make isc_mutex_destroy return void 2018-11-22 11:52:08 +00:00
ssu_external.c Ensure that POSIX strerror_r variant is use even when _GNU_SOURCE is enabled by default 2018-08-29 13:31:28 +02:00
stats.c Move dnssec_keyid_max out rrsettype counters enum 2019-08-12 10:43:44 +02:00
tcpmsg.c Replace custom isc_u?intNN_t types with C99 u?intNN_t types 2018-08-08 09:37:28 +02:00
time.c Replace custom isc_u?intNN_t types with C99 u?intNN_t types 2018-08-08 09:37:28 +02:00
timer.c Replace custom isc_boolean_t with C standard bool type 2018-08-08 09:37:30 +02:00
tkey.c Replace RUNTIME_CHECK(dns_name_copy(..., NULL)) with dns_name_copynf() 2019-10-04 14:08:26 +10:00
tsec.c Hint the compiler with ISC_UNREACHABLE(); that code after INSIST(0); cannot be reached 2018-11-08 12:22:17 +07:00
tsig.c lib/dns/tsig.c: Suppress Cppcheck false positive error uninitStructMember 2019-10-03 09:50:26 +02:00
tsig_p.h Replace custom isc_boolean_t with C standard bool type 2018-08-08 09:37:30 +02:00
ttl.c Remove randomly scattered additional style check suppressions that caused unmatchedSuppression 2019-10-03 09:50:27 +02:00
update.c Jitter signatures times when adding dynamic records. 2019-11-06 15:14:16 +01:00
validator.c Replace RUNTIME_CHECK(dns_name_copy(..., NULL)) with dns_name_copynf() 2019-10-04 14:08:26 +10:00
version.c address win32 build issues 2018-05-22 16:32:21 -07:00
view.c hurd: Fix build 2019-11-12 09:27:19 +01:00
xfrin.c Prevent races when waiting for log messages 2019-02-14 10:41:56 +01:00
zone.c Refactor loop body as copy_non_dnssec_records. 2019-12-20 22:05:24 +11:00
zone_p.h Replace custom isc_boolean_t with C standard bool type 2018-08-08 09:37:30 +02:00
zonekey.c Replace custom isc_boolean_t with C standard bool type 2018-08-08 09:37:30 +02:00
zoneverify.c libdns: Change check_dnskey_sigs() return type to void to match the reality how the function is used 2019-11-05 09:48:51 +01:00
zt.c Add a comment explaining a mirror zone glitch 2019-02-08 05:49:22 -05:00