summaryrefslogtreecommitdiff
path: root/usr.sbin/nsd/options.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/nsd/options.c')
-rw-r--r--usr.sbin/nsd/options.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/usr.sbin/nsd/options.c b/usr.sbin/nsd/options.c
index 058ceeccab4..8c1e58a3b90 100644
--- a/usr.sbin/nsd/options.c
+++ b/usr.sbin/nsd/options.c
@@ -834,6 +834,7 @@ pattern_options_create(region_type* region)
#ifdef RATELIMIT
p->rrl_whitelist = 0;
#endif
+ p->multi_master_check = 0;
return p;
}
@@ -964,6 +965,7 @@ copy_pat_fixed(region_type* region, pattern_options_t* orig,
#ifdef RATELIMIT
orig->rrl_whitelist = p->rrl_whitelist;
#endif
+ orig->multi_master_check = p->multi_master_check;
}
void
@@ -1049,6 +1051,7 @@ pattern_options_equal(pattern_options_t* p, pattern_options_t* q)
#ifdef RATELIMIT
if(p->rrl_whitelist != q->rrl_whitelist) return 0;
#endif
+ if(!booleq(p->multi_master_check,q->multi_master_check)) return 0;
if(p->size_limit_xfr != q->size_limit_xfr) return 0;
return 1;
}
@@ -1208,6 +1211,7 @@ pattern_options_marshal(struct buffer* b, pattern_options_t* p)
marshal_u8(b, p->max_retry_time_is_default);
marshal_u32(b, p->min_retry_time);
marshal_u8(b, p->min_retry_time_is_default);
+ marshal_u8(b, p->multi_master_check);
}
pattern_options_t*
@@ -1239,6 +1243,7 @@ pattern_options_unmarshal(region_type* r, struct buffer* b)
p->max_retry_time_is_default = unmarshal_u8(b);
p->min_retry_time = unmarshal_u32(b);
p->min_retry_time_is_default = unmarshal_u8(b);
+ p->multi_master_check = unmarshal_u8(b);
return p;
}
@@ -1594,7 +1599,10 @@ acl_key_matches(acl_options_t* acl, struct query* q)
return 0; /* wrong key name */
}
if(tsig_strlowercmp(q->tsig.algorithm->short_name,
- acl->key_options->algorithm) != 0) {
+ acl->key_options->algorithm) != 0 && (
+ strncmp("hmac-", q->tsig.algorithm->short_name, 5) != 0 ||
+ tsig_strlowercmp(q->tsig.algorithm->short_name+5,
+ acl->key_options->algorithm) != 0) ) {
DEBUG(DEBUG_XFRD,2, (LOG_ERR, "query tsig wrong algorithm"));
return 0; /* no such algo */
}
@@ -1979,6 +1987,8 @@ config_apply_pattern(const char* name)
pat->provide_xfr);
append_acl(&a->outgoing_interface, &cfg_parser->
current_outgoing_interface, pat->outgoing_interface);
+ if(pat->multi_master_check)
+ a->multi_master_check = pat->multi_master_check;
}
void