]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix unit test in test_entrynodes.c
authorCecylia Bocovich <cohosh@torproject.org>
Tue, 24 Sep 2024 20:13:29 +0000 (16:13 -0400)
committerCecylia Bocovich <cohosh@torproject.org>
Tue, 24 Sep 2024 20:13:29 +0000 (16:13 -0400)
src/test/test_entrynodes.c

index 118b66dfa78c189044e5c08aede043353d3c857a..7184e49c8c03186e553e734fde91eb2bd55acaa7 100644 (file)
@@ -1942,8 +1942,10 @@ test_entry_guard_select_for_circuit_no_confirmed(void *arg)
   tt_ptr_op(g2, OP_EQ, g);
 
   /* But if we impose a restriction, we don't get the same guard */
+  get_options_mutable()->EnforceDistinctSubnets = 0;
   rst = guard_create_exit_restriction((uint8_t*)g->identity);
   g2 = select_entry_guard_for_circuit(gs, GUARD_USAGE_TRAFFIC, rst, &state);
+  tt_assert(g2);
   tt_ptr_op(g2, OP_NE, g);
 
  done: