Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
BIND
Commits
4bb16c58
Commit
4bb16c58
authored
Jul 18, 2003
by
Mark Andrews
Browse files
1488. [bug] Don't override trust levels for glue addresses.
[RT #5764]
parent
c676c1b4
Changes
3
Hide whitespace changes
Inline
Side-by-side
CHANGES
View file @
4bb16c58
1488. [bug] Don't override trust levels for glue addresses.
[RT #5764]
1487. [bug] A REQUIRE() failure could be triggered if a zone was
queued for transfer and the zone was then removed.
[RT #6189]
...
...
lib/dns/adb.c
View file @
4bb16c58
...
...
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: adb.c,v 1.20
3
2003/0
2/27 02:20:15
marka Exp $ */
/* $Id: adb.c,v 1.20
4
2003/0
7/18 04:30:01
marka Exp $ */
/*
* Implementation notes
...
...
@@ -86,6 +86,7 @@
*/
#define ADB_CACHE_MINIMUM 10
/* seconds */
#define ADB_CACHE_MAXIMUM 86400
/* seconds (86400 = 24 hours) */
#define ADB_ENTRY_WINDOW 1800
/* seconds */
/*
* Wake up every CLEAN_SECONDS and clean CLEAN_BUCKETS buckets, so that all
...
...
@@ -572,7 +573,11 @@ import_rdataset(dns_adbname_t *adbname, dns_rdataset_t *rdataset,
if
(
addr_bucket
!=
DNS_ADB_INVALIDBUCKET
)
UNLOCK
(
&
adb
->
entrylocks
[
addr_bucket
]);
rdataset
->
ttl
=
ttlclamp
(
rdataset
->
ttl
);
if
(
rdataset
->
trust
==
dns_trust_glue
||
rdataset
->
trust
==
dns_trust_additional
)
rdataset
->
ttl
=
ADB_CACHE_MINIMUM
;
else
rdataset
->
ttl
=
ttlclamp
(
rdataset
->
ttl
);
if
(
rdtype
==
dns_rdatatype_a
)
{
DP
(
NCACHE_LEVEL
,
"expire_v4 set to MIN(%u,%u) import_rdataset"
,
...
...
@@ -3336,6 +3341,7 @@ dns_adb_adjustsrtt(dns_adb_t *adb, dns_adbaddrinfo_t *addr,
{
int
bucket
;
unsigned
int
new_srtt
;
isc_stdtime_t
now
;
REQUIRE
(
DNS_ADB_VALID
(
adb
));
REQUIRE
(
DNS_ADBADDRINFO_VALID
(
addr
));
...
...
@@ -3353,6 +3359,9 @@ dns_adb_adjustsrtt(dns_adb_t *adb, dns_adbaddrinfo_t *addr,
addr
->
entry
->
srtt
=
new_srtt
;
addr
->
srtt
=
new_srtt
;
isc_stdtime_get
(
&
now
);
addr
->
entry
->
expires
=
now
+
ADB_ENTRY_WINDOW
;
UNLOCK
(
&
adb
->
entrylocks
[
bucket
]);
}
...
...
@@ -3450,7 +3459,7 @@ dns_adb_freeaddrinfo(dns_adb_t *adb, dns_adbaddrinfo_t **addrp) {
bucket
=
addr
->
entry
->
lock_bucket
;
LOCK
(
&
adb
->
entrylocks
[
bucket
]);
entry
->
expires
=
now
+
1800
;
/* XXXRTH */
entry
->
expires
=
now
+
ADB_ENTRY_WINDOW
;
want_check_exit
=
dec_entry_refcnt
(
adb
,
entry
,
ISC_FALSE
);
...
...
lib/dns/resolver.c
View file @
4bb16c58
...
...
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: resolver.c,v 1.26
3
2003/0
4
/1
1
0
7:25:25
marka Exp $ */
/* $Id: resolver.c,v 1.26
4
2003/0
7
/1
8
0
4:30:01
marka Exp $ */
#include
<config.h>
...
...
@@ -3304,7 +3304,10 @@ cache_name(fetchctx_t *fctx, dns_name_t *name, isc_stdtime_t now) {
eresult
=
DNS_R_DNAME
;
}
}
if
(
rdataset
->
trust
==
dns_trust_glue
)
{
if
(
rdataset
->
trust
==
dns_trust_glue
&&
(
rdataset
->
type
==
dns_rdatatype_ns
||
(
rdataset
->
type
==
dns_rdatatype_sig
&&
rdataset
->
covers
==
dns_rdatatype_ns
)))
{
/*
* If the trust level is 'dns_trust_glue'
* then we are adding data from a referral
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment