[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Add regression test for Bug #20874
commit f282375fb7d9c527e4bff19dc1e8c6dc7627d137
Author: Neel Chauhan <neel@xxxxxxxxx>
Date: Sat Aug 11 15:39:00 2018 -0400
Add regression test for Bug #20874
---
src/test/test_options.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/test/test_options.c b/src/test/test_options.c
index 4e890205b..2cd8419a9 100644
--- a/src/test/test_options.c
+++ b/src/test/test_options.c
@@ -1634,6 +1634,18 @@ test_options_validate__reachable_addresses(void *ignored)
tt_str_op(tdata->opt->ReachableAddresses->value, OP_EQ, "*:82");
tor_free(msg);
+ free_options_test_data(tdata);
+ mock_clean_saved_logs();
+ tdata = get_options_test_data("FascistFirewall 1\n"
+ "ReachableAddresses *:82\n"
+ "MaxClientCircuitsPending 1\n"
+ "ConnLimit 1\n");
+
+ ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
+ tt_int_op(ret, OP_EQ, -1);
+ tt_ptr_op(tdata->opt->ReachableAddresses->next, OP_EQ, NULL);
+ tor_free(msg);
+
#define SERVERS_REACHABLE_MSG "Servers must be able to freely connect to" \
" the rest of the Internet, so they must not set Reachable*Addresses or" \
" FascistFirewall or FirewallPorts or ClientUseIPv4 0."
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits