mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 05:28:00 +00:00
[master] fix DLZ coredump
3777. [bug] EDNS EXPIRE code could dump core when processing DLZ queries. [RT #35493]
This commit is contained in:
parent
0f52ea95d8
commit
a2fd1de97d
3
CHANGES
3
CHANGES
@ -1,3 +1,6 @@
|
||||
3777. [bug] EDNS EXPIRE code could dump core when processing
|
||||
DLZ queries. [RT #35493]
|
||||
|
||||
3776. [bug] "rndc -q" suppresses output from successful
|
||||
rndc commands. Errors are printed on stderr.
|
||||
[RT #21393]
|
||||
|
@ -6075,7 +6075,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
|
||||
dns_fixedname_t fixed;
|
||||
dns_fixedname_t wildcardname;
|
||||
dns_dbversion_t *version, *zversion;
|
||||
dns_zone_t *zone, *raw = NULL, *mayberaw;
|
||||
dns_zone_t *zone;
|
||||
dns_rdata_cname_t cname;
|
||||
dns_rdata_dname_t dname;
|
||||
unsigned int options;
|
||||
@ -7869,25 +7869,33 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
|
||||
/*
|
||||
* Return the time to expire for slave zones.
|
||||
*/
|
||||
if (is_zone)
|
||||
dns_zone_getraw(zone, &raw);
|
||||
mayberaw = (raw != NULL) ? raw : zone;
|
||||
if (zone != NULL) {
|
||||
dns_zone_t *raw = NULL, *mayberaw;
|
||||
|
||||
if (is_zone && qtype == dns_rdatatype_soa &&
|
||||
(client->attributes & NS_CLIENTATTR_WANTEXPIRE) != 0 &&
|
||||
client->query.restarts == 0 &&
|
||||
dns_zone_gettype(mayberaw) == dns_zone_slave) {
|
||||
isc_time_t expiretime;
|
||||
isc_uint32_t secs;
|
||||
dns_zone_getexpiretime(zone, &expiretime);
|
||||
secs = isc_time_seconds(&expiretime);
|
||||
if (secs >= client->now && result == ISC_R_SUCCESS) {
|
||||
client->attributes |= NS_CLIENTATTR_HAVEEXPIRE;
|
||||
client->expire = secs - client->now;
|
||||
if (is_zone)
|
||||
dns_zone_getraw(zone, &raw);
|
||||
mayberaw = (raw != NULL) ? raw : zone;
|
||||
|
||||
if (is_zone && qtype == dns_rdatatype_soa &&
|
||||
((client->attributes &
|
||||
NS_CLIENTATTR_WANTEXPIRE) != 0) &&
|
||||
client->query.restarts == 0 &&
|
||||
dns_zone_gettype(mayberaw) == dns_zone_slave)
|
||||
{
|
||||
isc_time_t expiretime;
|
||||
isc_uint32_t secs;
|
||||
dns_zone_getexpiretime(zone, &expiretime);
|
||||
secs = isc_time_seconds(&expiretime);
|
||||
if (secs >= client->now &&
|
||||
result == ISC_R_SUCCESS) {
|
||||
client->attributes |=
|
||||
NS_CLIENTATTR_HAVEEXPIRE;
|
||||
client->expire = secs - client->now;
|
||||
}
|
||||
}
|
||||
if (raw != NULL)
|
||||
dns_zone_detach(&raw);
|
||||
}
|
||||
if (raw != NULL)
|
||||
dns_zone_detach(&raw);
|
||||
|
||||
if (dns64) {
|
||||
qtype = type = dns_rdatatype_aaaa;
|
||||
|
@ -3,7 +3,7 @@ These files were used for testing on Ubuntu Linux using SQLite3
|
||||
- Install SQLite3: sudo apt-get install sqlite3 libsqlite3-dev
|
||||
- Build sqlite3 DLZ module
|
||||
- Run "sqlite3 BindDB < dlz.schema" to set up database
|
||||
- Run "mysql BindDB < dlz.data" to populate it
|
||||
- Run "sqlite3 BindDB < dlz.data" to populate it
|
||||
- Run "named -gc named.conf"
|
||||
- Send test queries, e.g "dig @localhost -p 5300 example.com",
|
||||
"dig @localhost -p 5300 axfr example.com" (AXFR should be
|
||||
|
Loading…
x
Reference in New Issue
Block a user