mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 05:33:47 +01:00
Merge branch 'maint-0.4.5'
This commit is contained in:
commit
66597b9291
5
changes/ticket40106
Normal file
5
changes/ticket40106
Normal file
@ -0,0 +1,5 @@
|
||||
o Minor bugfixes (config, bridge):
|
||||
- Really fix the case where torrc has a missing ClientTransportPlugin but
|
||||
configured with a Bridge line and UseBridges. Previously, we failed to
|
||||
also look at the managed proxy list and thus it would fail for the
|
||||
"exec" case. Fixes bug 40106; bugfix on 0.4.5.1-alpha.
|
@ -2198,7 +2198,8 @@ options_act,(const or_options_t *old_options))
|
||||
* validation time. */
|
||||
SMARTLIST_FOREACH_BEGIN(bridge_list_get(), const bridge_info_t *, bi) {
|
||||
const char *bi_transport_name = bridget_get_transport_name(bi);
|
||||
if (bi_transport_name && !transport_get_by_name(bi_transport_name)) {
|
||||
if (bi_transport_name && (!transport_get_by_name(bi_transport_name) &&
|
||||
!managed_proxy_has_transport(bi_transport_name))) {
|
||||
log_warn(LD_CONFIG, "Bridge line with transport %s is missing a "
|
||||
"ClientTransportPlugin line", bi_transport_name);
|
||||
return -1;
|
||||
|
@ -368,6 +368,28 @@ static int unconfigured_proxies_n = 0;
|
||||
/** Boolean: True iff we might need to restart some proxies. */
|
||||
static int check_if_restarts_needed = 0;
|
||||
|
||||
/** Return true iff we have a managed_proxy_t in the global list is for the
|
||||
* given transport name. */
|
||||
bool
|
||||
managed_proxy_has_transport(const char *transport_name)
|
||||
{
|
||||
tor_assert(transport_name);
|
||||
|
||||
if (!managed_proxy_list) {
|
||||
return false;
|
||||
}
|
||||
|
||||
SMARTLIST_FOREACH_BEGIN(managed_proxy_list, const managed_proxy_t *, mp) {
|
||||
SMARTLIST_FOREACH_BEGIN(mp->transports_to_launch, const char *, name) {
|
||||
if (!strcasecmp(name, transport_name)) {
|
||||
return true;
|
||||
}
|
||||
} SMARTLIST_FOREACH_END(name);
|
||||
} SMARTLIST_FOREACH_END(mp);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Return true if there are still unconfigured managed proxies, or proxies
|
||||
* that need restarting. */
|
||||
int
|
||||
|
@ -41,6 +41,7 @@ void transport_free_(transport_t *transport);
|
||||
#define transport_free(tr) FREE_AND_NULL(transport_t, transport_free_, (tr))
|
||||
|
||||
MOCK_DECL(transport_t*, transport_get_by_name, (const char *name));
|
||||
bool managed_proxy_has_transport(const char *transport_name);
|
||||
|
||||
MOCK_DECL(void, pt_kickstart_proxy,
|
||||
(const smartlist_t *transport_list, char **proxy_argv,
|
||||
|
Loading…
Reference in New Issue
Block a user