3849. [bug] Disabling forwarding could trigger a REQUIRE assertion.

[RT #35979]

(cherry picked from commit 01f881c1c5)
This commit is contained in:
Mark Andrews
2014-05-15 16:55:55 +10:00
parent b56da33873
commit 0fe09c71ab
3 changed files with 19 additions and 10 deletions
+3
View File
@@ -1,3 +1,6 @@
3850. [bug] Disabling forwarding could trigger a REQUIRE assertion.
[RT #35979]
3849. [doc] Alphabetized dig's +options. [RT #35992]
3848. [bug] Adjust 'statistics-channels specified but not effective'
+11 -10
View File
@@ -3925,17 +3925,18 @@ configure_forward(const cfg_obj_t *config, dns_view_t *view, dns_name_t *origin,
/*
* DSCP value for forwarded requests.
*/
dscpobj = cfg_tuple_get(forwarders, "dscp");
if (!cfg_obj_isuint32(dscpobj))
dscp = ns_g_dscp;
else {
if (cfg_obj_asuint32(dscpobj) > 63) {
cfg_obj_log(dscpobj, ns_g_lctx, ISC_LOG_ERROR,
"dscp value '%u' is out of range",
cfg_obj_asuint32(dscpobj));
return (ISC_R_RANGE);
dscp = ns_g_dscp;
if (forwarders != NULL) {
dscpobj = cfg_tuple_get(forwarders, "dscp");
if (cfg_obj_isuint32(dscpobj)) {
if (cfg_obj_asuint32(dscpobj) > 63) {
cfg_obj_log(dscpobj, ns_g_lctx, ISC_LOG_ERROR,
"dscp value '%u' is out of range",
cfg_obj_asuint32(dscpobj));
return (ISC_R_RANGE);
}
dscp = (isc_dscp_t)cfg_obj_asuint32(dscpobj);
}
dscp = (isc_dscp_t)cfg_obj_asuint32(dscpobj);
}
faddresses = NULL;
+5
View File
@@ -59,3 +59,8 @@ zone "example5." {
type master;
file "example.db";
};
/* A forward zone without forwarders. */
zone "example6" {
type forward;
};