mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-26 07:31:33 +01:00
Merge remote-tracking branch 'dgoulet/bug23366_032_01'
This commit is contained in:
commit
33989cd002
3 changed files with 27 additions and 6 deletions
4
changes/bug23366
Normal file
4
changes/bug23366
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
o Minor bugfixes (test):
|
||||||
|
- Fix a broken OutboundAddress option unit test because the parsing
|
||||||
|
function was never returning an error on failure. Fixes bug #23366.;
|
||||||
|
bugfix on tor-0.3.0.3-alpha.
|
|
@ -7921,13 +7921,28 @@ parse_outbound_addresses(or_options_t *options, int validate_only, char **msg)
|
||||||
memset(&options->OutboundBindAddresses, 0,
|
memset(&options->OutboundBindAddresses, 0,
|
||||||
sizeof(options->OutboundBindAddresses));
|
sizeof(options->OutboundBindAddresses));
|
||||||
}
|
}
|
||||||
parse_outbound_address_lines(options->OutboundBindAddress,
|
|
||||||
OUTBOUND_ADDR_EXIT_AND_OR, options, validate_only, msg);
|
if (parse_outbound_address_lines(options->OutboundBindAddress,
|
||||||
parse_outbound_address_lines(options->OutboundBindAddressOR,
|
OUTBOUND_ADDR_EXIT_AND_OR, options,
|
||||||
OUTBOUND_ADDR_OR, options, validate_only, msg);
|
validate_only, msg) < 0) {
|
||||||
parse_outbound_address_lines(options->OutboundBindAddressExit,
|
goto err;
|
||||||
OUTBOUND_ADDR_EXIT, options, validate_only, msg);
|
}
|
||||||
|
|
||||||
|
if (parse_outbound_address_lines(options->OutboundBindAddressOR,
|
||||||
|
OUTBOUND_ADDR_OR, options, validate_only,
|
||||||
|
msg) < 0) {
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (parse_outbound_address_lines(options->OutboundBindAddressExit,
|
||||||
|
OUTBOUND_ADDR_EXIT, options, validate_only,
|
||||||
|
msg) < 0) {
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
err:
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Load one of the geoip files, <a>family</a> determining which
|
/** Load one of the geoip files, <a>family</a> determining which
|
||||||
|
|
|
@ -528,6 +528,8 @@ test_options_validate__outbound_addresses(void *ignored)
|
||||||
|
|
||||||
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
|
||||||
tt_int_op(ret, OP_EQ, -1);
|
tt_int_op(ret, OP_EQ, -1);
|
||||||
|
tt_str_op(msg, OP_EQ, "Multiple outbound bind addresses configured: "
|
||||||
|
"xxyy!!!sdfaf");
|
||||||
|
|
||||||
done:
|
done:
|
||||||
free_options_test_data(tdata);
|
free_options_test_data(tdata);
|
||||||
|
|
Loading…
Add table
Reference in a new issue