tor_addr_to_sockaddr(&listen_tor_addr,
0 /* kernel chooses port. */,
&listen_addr,
- sizeof (listen_addr));
+ sizeof(listen_addr));
if (bind(listener, &listen_addr, sizeof (listen_addr)) == -1)
goto tidy_up_and_fail;
if (listen(listener, 1) == -1)
smartlist_add(*dest, add);
log_debug(LD_CONFIG, "Adding a reject ExitPolicy 'reject %s:*'",
fmt_addr(addr));
-
}
/* Is addr public for the purposes of rejection? */
}
}
-
/** Parse <b>ExitPolicy</b> member of <b>or_options</b> into <b>result</b>
* smartlist.
* If <b>or_options->IPv6Exit</b> is false, prepend an entry that
policy_string = smartlist_join_strings(policy_string_list, "\n", 0, NULL);
-done:
+ done:
SMARTLIST_FOREACH(policy_string_list, char *, str, tor_free(str));
smartlist_free(policy_string_list);
addr_policy_list_free(policy);
policy = NULL;
-done:
+ done:
addr_policy_list_free(policy);
if (test_configured_ports) {
SMARTLIST_FOREACH(test_configured_ports,
}
static routerinfo_t *mock_desc_routerinfo = NULL;
-static const routerinfo_t *mock_router_get_my_routerinfo(void)
+static const routerinfo_t *
+mock_router_get_my_routerinfo(void)
{
return mock_desc_routerinfo;
}
tt_assert(strlen(answer) == ipv4_len + ipv6_len + 1);
tor_free(answer);
-done:
+ done:
tor_free(answer);
UNMOCK(get_options);
UNMOCK(router_get_my_routerinfo);
{ "getinfo_helper_policies", test_policies_getinfo_helper_policies, 0, NULL,
NULL },
{ "reject_exit_address", test_policies_reject_exit_address, 0, NULL, NULL },
- { "reject_interface_address", test_policies_reject_interface_address, 0, NULL, NULL },
+ { "reject_interface_address", test_policies_reject_interface_address, 0,
+ NULL, NULL },
{ "reject_port_address", test_policies_reject_port_address, 0, NULL, NULL },
END_OF_TESTCASES
};