Commit e24762c0 authored by Libor Peltan's avatar Libor Peltan Committed by Daniel Salzman

bugfix: nsec3 opt out not working in some cases

parent 94f06ba3
...@@ -676,11 +676,8 @@ static int fix_nsec3_nodes(zone_update_t *update, const dnssec_nsec3_params_t *p ...@@ -676,11 +676,8 @@ static int fix_nsec3_nodes(zone_update_t *update, const dnssec_nsec3_params_t *p
*/ */
static bool nsec3_is_empty(zone_node_t *node, bool opt_out) static bool nsec3_is_empty(zone_node_t *node, bool opt_out)
{ {
if (node->children > 0) { return ((node->children == 0 && knot_nsec_empty_nsec_and_rrsigs_in_node(node)) ||
return false; nsec3_opt_out(node, opt_out));
}
return knot_nsec_empty_nsec_and_rrsigs_in_node(node) || nsec3_opt_out(node, opt_out);
} }
/*! /*!
......
...@@ -22,6 +22,7 @@ for zone in zones: ...@@ -22,6 +22,7 @@ for zone in zones:
master.dnssec(zone).nsec3 = random.choice([True, False]) master.dnssec(zone).nsec3 = random.choice([True, False])
master.dnssec(zone).nsec3_iters = 2 master.dnssec(zone).nsec3_iters = 2
master.dnssec(zone).nsec3_salt_len = 8 master.dnssec(zone).nsec3_salt_len = 8
master.dnssec(zone).nsec3_opt_out = (random.random() < 0.5)
t.start() t.start()
t.sleep(4) t.sleep(4)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment