Commit 7f95ef6e authored by David Goulet's avatar David Goulet 🔆 Committed by Nick Mathewson
Browse files

config: Remove {Control,DNS,Dir,Socks,Trans,NATD,OR}ListenAddress option



Deprecated in 0.2.9.2-alpha, this commits changes it as OBSOLETE() and cleans
up the code associated with it.

Partially fixes #22060
Signed-off-by: David Goulet's avatarDavid Goulet <dgoulet@torproject.org>
parent 039e2a24
......@@ -19,3 +19,6 @@
rendered obsolete. Code has been removed and feature no longer exists.
- TLSECGroup was deprecated in 0.2.9.2-alpha and now has been rendered
obsolete. Code has been removed and feature no longer exists.
- {Control,DNS,Dir,Socks,Trans,NATD,OR}ListenAddress was deprecated in
0.2.9.2-alpha and now has been rendered obsolete. Code has been removed
and feature no longer exists.
......@@ -341,14 +341,6 @@ GENERAL OPTIONS
Unix domain sockets only: Do not insist that the directory
that holds the socket be read-restricted.
[[ControlListenAddress]] **ControlListenAddress** __IP__[:__PORT__]::
Bind the controller listener to this address. If you specify a port, bind
to this port rather than the one specified in ControlPort. We strongly
recommend that you leave this alone unless you know what you're doing,
since giving attackers access to your control listener is really
dangerous. This directive can be specified multiple
times to bind to multiple addresses/ports. (Default: 127.0.0.1)
[[ControlSocket]] **ControlSocket** __Path__::
Like ControlPort, but listens on a Unix domain socket, rather than a TCP
socket. '0' disables ControlSocket (Unix and Unix-like systems only.)
......@@ -1163,16 +1155,6 @@ The following options are useful only for clients (that is, if
line is used, and all earlier flags are ignored. No error is issued for
conflicting flags.
[[SocksListenAddress]] **SocksListenAddress** __IP__[:__PORT__]::
Bind to this address to listen for connections from Socks-speaking
applications. (Default: 127.0.0.1) You can also specify a port (e.g.
192.168.0.1:9100). This directive can be specified multiple times to bind
to multiple addresses/ports. (DEPRECATED: As of 0.2.3.x-alpha, you can
now use multiple SocksPort entries, and provide addresses for SocksPort
entries, so SocksListenAddress no longer has a purpose. For backward
compatibility, SocksListenAddress is only allowed when SocksPort is just
a port number.)
[[SocksPolicy]] **SocksPolicy** __policy__,__policy__,__...__::
Set an entrance policy for this server, to limit who can connect to the
SocksPort and DNSPort ports. The policies have the same form as exit
......@@ -1312,17 +1294,7 @@ The following options are useful only for clients (that is, if
TransPort requires OS support for transparent proxies, such as BSDs' pf or
Linux's IPTables. If you're planning to use Tor as a transparent proxy for
a network, you'll want to examine and change VirtualAddrNetwork from the
default setting. You'll also want to set the TransListenAddress option for
the network you'd like to proxy. (Default: 0)
[[TransListenAddress]] **TransListenAddress** __IP__[:__PORT__]::
Bind to this address to listen for transparent proxy connections. (Default:
127.0.0.1). This is useful for exporting a transparent proxy server to an
entire network. (DEPRECATED: As of 0.2.3.x-alpha, you can
now use multiple TransPort entries, and provide addresses for TransPort
entries, so TransListenAddress no longer has a purpose. For backward
compatibility, TransListenAddress is only allowed when TransPort is just
a port number.)
default setting. (Default: 0)
[[TransProxyType]] **TransProxyType** **default**|**TPROXY**|**ipfw**|**pf-divert**::
TransProxyType may only be enabled when there is transparent proxy listener
......@@ -1330,9 +1302,7 @@ The following options are useful only for clients (that is, if
+
Set this to "TPROXY" if you wish to be able to use the TPROXY Linux module
to transparently proxy connections that are configured using the TransPort
option. This setting lets the listener on the TransPort accept connections
for all addresses, even when the TransListenAddress is configured for an
internal address. Detailed information on how to configure the TPROXY
option. Detailed information on how to configure the TPROXY
feature can be found in the Linux kernel source tree in the file
Documentation/networking/tproxy.txt. +
+
......@@ -1360,13 +1330,6 @@ The following options are useful only for clients (that is, if
+
This option is only for people who cannot use TransPort. (Default: 0)
[[NATDListenAddress]] **NATDListenAddress** __IP__[:__PORT__]::
Bind to this address to listen for NATD connections. (DEPRECATED: As of
0.2.3.x-alpha, you can now use multiple NATDPort entries, and provide
addresses for NATDPort entries, so NATDListenAddress no longer has a
purpose. For backward compatibility, NATDListenAddress is only allowed
when NATDPort is just a port number.)
[[AutomapHostsOnResolve]] **AutomapHostsOnResolve** **0**|**1**::
When this option is enabled, and we get a request to resolve an address
that ends with one of the suffixes in **AutomapHostsSuffixes**, we map an
......@@ -1387,13 +1350,6 @@ The following options are useful only for clients (that is, if
addresses/ports. See SocksPort for an explanation of isolation
flags. (Default: 0)
[[DNSListenAddress]] **DNSListenAddress** __IP__[:__PORT__]::
Bind to this address to listen for DNS connections. (DEPRECATED: As of
0.2.3.x-alpha, you can now use multiple DNSPort entries, and provide
addresses for DNSPort entries, so DNSListenAddress no longer has a
purpose. For backward compatibility, DNSListenAddress is only allowed
when DNSPort is just a port number.)
[[ClientDNSRejectInternalAddresses]] **ClientDNSRejectInternalAddresses** **0**|**1**::
If true, Tor does not believe any anonymously retrieved DNS answer that
tells it that an address resolves to an internal address (like 127.0.0.1 or
......@@ -1798,15 +1754,6 @@ is non-zero):
For obvious reasons, NoAdvertise and NoListen are mutually exclusive, and
IPv4Only and IPv6Only are mutually exclusive.
[[ORListenAddress]] **ORListenAddress** __IP__[:__PORT__]::
Bind to this IP address to listen for connections from Tor clients and
servers. If you specify a port, bind to this port rather than the one
specified in ORPort. (Default: 0.0.0.0) This directive can be specified
multiple times to bind to multiple addresses/ports. +
+
This option is deprecated; you can get the same behavior with ORPort now
that it supports NoAdvertise and explicit addresses.
[[PortForwarding]] **PortForwarding** **0**|**1**::
Attempt to automatically forward the DirPort and ORPort on a NAT router
connecting this Tor server to the Internet. If set, Tor will try both
......@@ -2076,15 +2023,6 @@ details.)
+
The same flags are supported here as are supported by ORPort.
[[DirListenAddress]] **DirListenAddress** __IP__[:__PORT__]::
Bind the directory service to this address. If you specify a port, bind to
this port rather than the one specified in DirPort. (Default: 0.0.0.0)
This directive can be specified multiple times to bind to multiple
addresses/ports. +
+
This option is deprecated; you can get the same behavior with DirPort now
that it supports NoAdvertise and explicit addresses.
[[DirPolicy]] **DirPolicy** __policy__,__policy__,__...__::
Set an entrance policy for this server, to limit who can connect to the
directory ports. The policies have the same form as exit policies above,
......
......@@ -261,7 +261,7 @@ static config_var_t option_vars_[] = {
V(ConstrainedSockets, BOOL, "0"),
V(ConstrainedSockSize, MEMUNIT, "8192"),
V(ContactInfo, STRING, NULL),
V(ControlListenAddress, LINELIST, NULL),
OBSOLETE("ControlListenAddress"),
VPORT(ControlPort),
V(ControlPortFileGroupReadable,BOOL, "0"),
V(ControlPortWriteToFile, FILENAME, NULL),
......@@ -278,7 +278,7 @@ static config_var_t option_vars_[] = {
V(DisableNetwork, BOOL, "0"),
V(DirAllowPrivateAddresses, BOOL, "0"),
V(TestingAuthDirTimeToLearnReachability, INTERVAL, "30 minutes"),
V(DirListenAddress, LINELIST, NULL),
OBSOLETE("DirListenAddress"),
V(DirPolicy, LINELIST, NULL),
VPORT(DirPort),
V(DirPortFrontPage, FILENAME, NULL),
......@@ -292,7 +292,7 @@ static config_var_t option_vars_[] = {
OBSOLETE("DisableV2DirectoryInfo_"),
OBSOLETE("DynamicDHGroups"),
VPORT(DNSPort),
V(DNSListenAddress, LINELIST, NULL),
OBSOLETE("DNSListenAddress"),
V(DownloadExtraInfo, BOOL, "0"),
V(TestingEnableConnBwEvent, BOOL, "0"),
V(TestingEnableCellStatsEvent, BOOL, "0"),
......@@ -398,7 +398,7 @@ static config_var_t option_vars_[] = {
V(MyFamily, STRING, NULL),
V(NewCircuitPeriod, INTERVAL, "30 seconds"),
OBSOLETE("NamingAuthoritativeDirectory"),
V(NATDListenAddress, LINELIST, NULL),
OBSOLETE("NATDListenAddress"),
VPORT(NATDPort),
V(Nickname, STRING, NULL),
V(PredictedPortsRelevanceTime, INTERVAL, "1 hour"),
......@@ -408,7 +408,7 @@ static config_var_t option_vars_[] = {
V(NumDirectoryGuards, UINT, "0"),
V(NumEntryGuards, UINT, "0"),
V(OfflineMasterKey, BOOL, "0"),
V(ORListenAddress, LINELIST, NULL),
OBSOLETE("ORListenAddress"),
VPORT(ORPort),
V(OutboundBindAddress, LINELIST, NULL),
V(OutboundBindAddressOR, LINELIST, NULL),
......@@ -481,7 +481,7 @@ static config_var_t option_vars_[] = {
V(SchedulerHighWaterMark__, MEMUNIT, "101 MB"),
V(SchedulerMaxFlushCells__, UINT, "1000"),
V(ShutdownWaitLength, INTERVAL, "30 seconds"),
V(SocksListenAddress, LINELIST, NULL),
OBSOLETE("SocksListenAddress"),
V(SocksPolicy, LINELIST, NULL),
VPORT(SocksPort),
V(SocksTimeout, INTERVAL, "2 minutes"),
......@@ -497,7 +497,7 @@ static config_var_t option_vars_[] = {
OBSOLETE("TLSECGroup"),
V(TrackHostExits, CSV, NULL),
V(TrackHostExitsExpire, INTERVAL, "30 minutes"),
V(TransListenAddress, LINELIST, NULL),
OBSOLETE("TransListenAddress"),
VPORT(TransPort),
V(TransProxyType, STRING, "default"),
OBSOLETE("TunnelDirConns"),
......@@ -664,15 +664,6 @@ static const config_deprecation_t option_deprecation_notes_[] = {
"a wide variety of application-level attacks." },
{ "ClientDNSRejectInternalAddresses", "Turning this on makes your client "
"easier to fingerprint, and may open you to esoteric attacks." },
{ "ControlListenAddress", "Use ControlPort instead." },
{ "DirListenAddress", "Use DirPort instead, possibly with the "
"NoAdvertise sub-option" },
{ "DNSListenAddress", "Use DNSPort instead." },
{ "SocksListenAddress", "Use SocksPort instead." },
{ "TransListenAddress", "Use TransPort instead." },
{ "NATDListenAddress", "Use NATDPort instead." },
{ "ORListenAddress", "Use ORPort instead, possibly with the "
"NoAdvertise sub-option" },
/* End of options deprecated since 0.2.9.2-alpha. */
{ NULL, NULL }
......@@ -3070,14 +3061,12 @@ options_validate(or_options_t *old_options, or_options_t *options,
if (strcasecmp(options->TransProxyType, "default") &&
!options->TransPort_set) {
REJECT("Cannot use TransProxyType without any valid TransPort or "
"TransListenAddress.");
REJECT("Cannot use TransProxyType without any valid TransPort.");
}
}
#else
if (options->TransPort_set)
REJECT("TransPort and TransListenAddress are disabled "
"in this build.");
REJECT("TransPort is disabled in this build.");
#endif
if (options->TokenBucketRefillInterval <= 0
......@@ -6369,14 +6358,9 @@ warn_client_dns_cache(const char *option, int disabling)
/**
* Parse port configuration for a single port type.
*
* Read entries of the "FooPort" type from the list <b>ports</b>, and
* entries of the "FooListenAddress" type from the list
* <b>listenaddrs</b>. Two syntaxes are supported: a legacy syntax
* where FooPort is at most a single entry containing a port number and
* where FooListenAddress has any number of address:port combinations;
* and a new syntax where there are no FooListenAddress entries and
* where FooPort can have any number of entries of the format
* "[Address:][Port] IsolationOptions".
* Read entries of the "FooPort" type from the list <b>ports</b>. Syntax is
* that FooPort can have any number of entries of the format
* "[Address:][Port] IsolationOptions".
*
* In log messages, describe the port type as <b>portname</b>.
*
......@@ -6390,9 +6374,6 @@ warn_client_dns_cache(const char *option, int disabling)
* ports are not on a local address. If CL_PORT_FORBID_NONLOCAL is set,
* this is a control port with no password set: don't even allow it.
*
* Unless CL_PORT_ALLOW_EXTRA_LISTENADDR is set in <b>flags</b>, warn
* if FooListenAddress is set but FooPort is 0.
*
* If CL_PORT_SERVER_OPTIONS is set in <b>flags</b>, do not allow stream
* isolation options in the FooPort entries; instead allow the
* server-port option set.
......@@ -6407,7 +6388,6 @@ warn_client_dns_cache(const char *option, int disabling)
STATIC int
parse_port_config(smartlist_t *out,
const config_line_t *ports,
const config_line_t *listenaddrs,
const char *portname,
int listener_type,
const char *defaultaddr,
......@@ -6424,90 +6404,12 @@ parse_port_config(smartlist_t *out,
const unsigned forbid_nonlocal = flags & CL_PORT_FORBID_NONLOCAL;
const unsigned default_to_group_writable =
flags & CL_PORT_DFLT_GROUP_WRITABLE;
const unsigned allow_spurious_listenaddr =
flags & CL_PORT_ALLOW_EXTRA_LISTENADDR;
const unsigned takes_hostnames = flags & CL_PORT_TAKES_HOSTNAMES;
const unsigned is_unix_socket = flags & CL_PORT_IS_UNIXSOCKET;
int got_zero_port=0, got_nonzero_port=0;
char *unix_socket_path = NULL;
/* FooListenAddress is deprecated; let's make it work like it used to work,
* though. */
if (listenaddrs) {
int mainport = defaultport;
if (ports && ports->next) {
log_warn(LD_CONFIG, "%sListenAddress can't be used when there are "
"multiple %sPort lines", portname, portname);
return -1;
} else if (ports) {
if (!strcmp(ports->value, "auto")) {
mainport = CFG_AUTO_PORT;
} else {
int ok;
mainport = (int)tor_parse_long(ports->value, 10, 0, 65535, &ok, NULL);
if (!ok) {
log_warn(LD_CONFIG, "%sListenAddress can only be used with a single "
"%sPort with value \"auto\" or 1-65535 and no options set.",
portname, portname);
return -1;
}
}
}
if (mainport == 0) {
if (allow_spurious_listenaddr)
return 1; /*DOCDOC*/
log_warn(LD_CONFIG, "%sPort must be defined if %sListenAddress is used",
portname, portname);
return -1;
}
if (use_server_options && out) {
/* Add a no_listen port. */
port_cfg_t *cfg = port_cfg_new(0);
cfg->type = listener_type;
cfg->port = mainport;
tor_addr_make_unspec(&cfg->addr); /* Server ports default to 0.0.0.0 */
cfg->server_cfg.no_listen = 1;
cfg->server_cfg.bind_ipv4_only = 1;
/* cfg->entry_cfg defaults are already set by port_cfg_new */
smartlist_add(out, cfg);
}
for (; listenaddrs; listenaddrs = listenaddrs->next) {
tor_addr_t addr;
uint16_t port = 0;
if (tor_addr_port_lookup(listenaddrs->value, &addr, &port) < 0) {
log_warn(LD_CONFIG, "Unable to parse %sListenAddress '%s'",
portname, listenaddrs->value);
return -1;
}
if (out) {
port_cfg_t *cfg = port_cfg_new(0);
cfg->type = listener_type;
cfg->port = port ? port : mainport;
tor_addr_copy(&cfg->addr, &addr);
cfg->entry_cfg.session_group = SESSION_GROUP_UNSET;
cfg->entry_cfg.isolation_flags = ISO_DEFAULT;
cfg->server_cfg.no_advertise = 1;
smartlist_add(out, cfg);
}
}
if (warn_nonlocal && out) {
if (is_control)
warn_nonlocal_controller_ports(out, forbid_nonlocal);
else if (is_ext_orport)
warn_nonlocal_ext_orports(out, portname);
else
warn_nonlocal_client_ports(out, portname, listener_type);
}
return 0;
} /* end if (listenaddrs) */
/* No ListenAddress lines. If there's no FooPort, then maybe make a default
* one. */
/* If there's no FooPort, then maybe make a default one. */
if (! ports) {
if (defaultport && defaultaddr && out) {
port_cfg_t *cfg = port_cfg_new(is_unix_socket ? strlen(defaultaddr) : 0);
......@@ -6978,36 +6880,35 @@ parse_ports(or_options_t *options, int validate_only,
const unsigned gw_flag = options->SocksSocketsGroupWritable ?
CL_PORT_DFLT_GROUP_WRITABLE : 0;
if (parse_port_config(ports,
options->SocksPort_lines, options->SocksListenAddress,
options->SocksPort_lines,
"Socks", CONN_TYPE_AP_LISTENER,
"127.0.0.1", 9050,
CL_PORT_WARN_NONLOCAL|CL_PORT_ALLOW_EXTRA_LISTENADDR|
CL_PORT_TAKES_HOSTNAMES|gw_flag) < 0) {
*msg = tor_strdup("Invalid SocksPort/SocksListenAddress configuration");
CL_PORT_WARN_NONLOCAL|CL_PORT_TAKES_HOSTNAMES|gw_flag) < 0) {
*msg = tor_strdup("Invalid SocksPort configuration");
goto err;
}
if (parse_port_config(ports,
options->DNSPort_lines, options->DNSListenAddress,
options->DNSPort_lines,
"DNS", CONN_TYPE_AP_DNS_LISTENER,
"127.0.0.1", 0,
CL_PORT_WARN_NONLOCAL|CL_PORT_TAKES_HOSTNAMES) < 0) {
*msg = tor_strdup("Invalid DNSPort/DNSListenAddress configuration");
*msg = tor_strdup("Invalid DNSPort configuration");
goto err;
}
if (parse_port_config(ports,
options->TransPort_lines, options->TransListenAddress,
options->TransPort_lines,
"Trans", CONN_TYPE_AP_TRANS_LISTENER,
"127.0.0.1", 0,
CL_PORT_WARN_NONLOCAL) < 0) {
*msg = tor_strdup("Invalid TransPort/TransListenAddress configuration");
*msg = tor_strdup("Invalid TransPort configuration");
goto err;
}
if (parse_port_config(ports,
options->NATDPort_lines, options->NATDListenAddress,
options->NATDPort_lines,
"NATD", CONN_TYPE_AP_NATD_LISTENER,
"127.0.0.1", 0,
CL_PORT_WARN_NONLOCAL) < 0) {
*msg = tor_strdup("Invalid NatdPort/NatdListenAddress configuration");
*msg = tor_strdup("Invalid NatdPort configuration");
goto err;
}
{
......@@ -7023,16 +6924,14 @@ parse_ports(or_options_t *options, int validate_only,
if (parse_port_config(ports,
options->ControlPort_lines,
options->ControlListenAddress,
"Control", CONN_TYPE_CONTROL_LISTENER,
"127.0.0.1", 0,
control_port_flags) < 0) {
*msg = tor_strdup("Invalid ControlPort/ControlListenAddress "
"configuration");
*msg = tor_strdup("Invalid ControlPort configuration");
goto err;
}
if (parse_port_config(ports, options->ControlSocket, NULL,
if (parse_port_config(ports, options->ControlSocket,
"ControlSocket",
CONN_TYPE_CONTROL_LISTENER, NULL, 0,
control_port_flags | CL_PORT_IS_UNIXSOCKET) < 0) {
......@@ -7042,15 +6941,15 @@ parse_ports(or_options_t *options, int validate_only,
}
if (! options->ClientOnly) {
if (parse_port_config(ports,
options->ORPort_lines, options->ORListenAddress,
options->ORPort_lines,
"OR", CONN_TYPE_OR_LISTENER,
"0.0.0.0", 0,
CL_PORT_SERVER_OPTIONS) < 0) {
*msg = tor_strdup("Invalid ORPort/ORListenAddress configuration");
*msg = tor_strdup("Invalid ORPort configuration");
goto err;
}
if (parse_port_config(ports,
options->ExtORPort_lines, NULL,
options->ExtORPort_lines,
"ExtOR", CONN_TYPE_EXT_OR_LISTENER,
"127.0.0.1", 0,
CL_PORT_SERVER_OPTIONS|CL_PORT_WARN_NONLOCAL) < 0) {
......@@ -7058,11 +6957,11 @@ parse_ports(or_options_t *options, int validate_only,
goto err;
}
if (parse_port_config(ports,
options->DirPort_lines, options->DirListenAddress,
options->DirPort_lines,
"Dir", CONN_TYPE_DIR_LISTENER,
"0.0.0.0", 0,
CL_PORT_SERVER_OPTIONS) < 0) {
*msg = tor_strdup("Invalid DirPort/DirListenAddress configuration");
*msg = tor_strdup("Invalid DirPort configuration");
goto err;
}
}
......
......@@ -157,7 +157,7 @@ smartlist_t *get_options_for_server_transport(const char *transport);
#define CL_PORT_NO_STREAM_OPTIONS (1u<<0)
#define CL_PORT_WARN_NONLOCAL (1u<<1)
#define CL_PORT_ALLOW_EXTRA_LISTENADDR (1u<<2)
/* Was CL_PORT_ALLOW_EXTRA_LISTENADDR (1u<<2) */
#define CL_PORT_SERVER_OPTIONS (1u<<3)
#define CL_PORT_FORBID_NONLOCAL (1u<<4)
#define CL_PORT_TAKES_HOSTNAMES (1u<<5)
......@@ -193,7 +193,6 @@ STATIC int have_enough_mem_for_dircache(const or_options_t *options,
size_t total_mem, char **msg);
STATIC int parse_port_config(smartlist_t *out,
const config_line_t *ports,
const config_line_t *listenaddrs,
const char *portname,
int listener_type,
const char *defaultaddr,
......
......@@ -3605,21 +3605,6 @@ typedef struct {
* configured ports. */
config_line_t *SocksPolicy; /**< Lists of socks policy components */
config_line_t *DirPolicy; /**< Lists of dir policy components */
/** Addresses to bind for listening for SOCKS connections. */
config_line_t *SocksListenAddress;
/** Addresses to bind for listening for transparent pf/netfilter
* connections. */
config_line_t *TransListenAddress;
/** Addresses to bind for listening for transparent natd connections */
config_line_t *NATDListenAddress;
/** Addresses to bind for listening for SOCKS connections. */
config_line_t *DNSListenAddress;
/** Addresses to bind for listening for OR connections. */
config_line_t *ORListenAddress;
/** Addresses to bind for listening for directory connections. */
config_line_t *DirListenAddress;
/** Addresses to bind for listening for control connections. */
config_line_t *ControlListenAddress;
/** Local address to bind outbound sockets */
config_line_t *OutboundBindAddress;
/** Local address to bind outbound relay sockets */
......
......@@ -1647,8 +1647,7 @@ MOCK_IMPL(int,
server_mode,(const or_options_t *options))
{
if (options->ClientOnly) return 0;
/* XXXX I believe we can kill off ORListenAddress here.*/
return (options->ORPort_set || options->ORListenAddress);
return (options->ORPort_set);
}
/** Return true iff we are trying to be a non-bridge server.
......
This diff is collapsed.
......@@ -402,7 +402,7 @@ test_options_validate__uname_for_server(void *ignored)
(void)ignored;
char *msg;
options_test_data_t *tdata = get_options_test_data(
"ORListenAddress 127.0.0.1:5555");
"ORPort 127.0.0.1:5555");
setup_capture_of_logs(LOG_WARN);
MOCK(get_uname, fixed_get_uname);
......@@ -536,7 +536,7 @@ test_options_validate__contactinfo(void *ignored)
int ret;
char *msg;
options_test_data_t *tdata = get_options_test_data(
"ORListenAddress 127.0.0.1:5555\nORPort 955");
"ORPort 127.0.0.1:5555");
setup_capture_of_logs(LOG_DEBUG);
tdata->opt->ContactInfo = NULL;
......@@ -549,7 +549,7 @@ test_options_validate__contactinfo(void *ignored)
tor_free(msg);
free_options_test_data(tdata);
tdata = get_options_test_data("ORListenAddress 127.0.0.1:5555\nORPort 955\n"
tdata = get_options_test_data("ORPort 127.0.0.1:5555\n"
"ContactInfo hella@example.org");
mock_clean_saved_logs();
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
......@@ -957,8 +957,7 @@ test_options_validate__relay_with_hidden_services(void *ignored)
char *msg;
setup_capture_of_logs(LOG_DEBUG);
options_test_data_t *tdata = get_options_test_data(
"ORListenAddress 127.0.0.1:5555\n"
"ORPort 955\n"
"ORPort 127.0.0.1:5555\n"
"HiddenServiceDir "
"/Library/Tor/var/lib/tor/hidden_service/\n"
"HiddenServicePort 80 127.0.0.1:8080\n"
......@@ -1028,7 +1027,7 @@ test_options_validate__transproxy(void *ignored)
#else
tt_int_op(tdata->opt->TransProxyType_parsed, OP_EQ, TPT_PF_DIVERT);
tt_str_op(msg, OP_EQ, "Cannot use TransProxyType without "
"any valid TransPort or TransListenAddress.");
"any valid TransPort.");
#endif
tor_free(msg);
......@@ -1043,7 +1042,7 @@ test_options_validate__transproxy(void *ignored)
#else
tt_int_op(tdata->opt->TransProxyType_parsed, OP_EQ, TPT_TPROXY);
tt_str_op(msg, OP_EQ, "Cannot use TransProxyType without any valid "
"TransPort or TransListenAddress.");
"TransPort.");
#endif
tor_free(msg);
......@@ -1059,7 +1058,7 @@ test_options_validate__transproxy(void *ignored)
#else
tt_int_op(tdata->opt->TransProxyType_parsed, OP_EQ, TPT_IPFW);
tt_str_op(msg, OP_EQ, "Cannot use TransProxyType without any valid "
"TransPort or TransListenAddress.");
"TransPort.");
#endif
tor_free(msg);
......@@ -1117,8 +1116,7 @@ test_options_validate__transproxy(void *ignored)
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
tt_int_op(ret, OP_EQ, -1);
tt_str_op(msg, OP_EQ, "TransPort and TransListenAddress are disabled in "
"this build.");
tt_str_op(msg, OP_EQ, "TransPort is disabled in this build.");
tor_free(msg);
#endif
......@@ -1694,8 +1692,7 @@ test_options_validate__reachable_addresses(void *ignored)
free_options_test_data(tdata);
tdata = get_options_test_data("ReachableAddresses *:82\n"
"ORListenAddress 127.0.0.1:5555\n"
"ORPort 955\n"
"ORPort 127.0.0.1:5555\n"
"MaxClientCircuitsPending 1\n"
"ConnLimit 1\n"
"SchedulerHighWaterMark__ 42\n"
......@@ -1708,8 +1705,7 @@ test_options_validate__reachable_addresses(void *ignored)
free_options_test_data(tdata);
tdata = get_options_test_data("ReachableORAddresses *:82\n"
"ORListenAddress 127.0.0.1:5555\n"
"ORPort 955\n"
"ORPort 127.0.0.1:5555\n"
"MaxClientCircuitsPending 1\n"
"ConnLimit 1\n"
"SchedulerHighWaterMark__ 42\n"
......@@ -1722,8 +1718,7 @@ test_options_validate__reachable_addresses(void *ignored)
free_options_test_data(tdata);
tdata = get_options_test_data("ReachableDirAddresses *:82\n"
"ORListenAddress 127.0.0.1:5555\n"
"ORPort 955\n"
"ORPort 127.0.0.1:5555\n"
"MaxClientCircuitsPending 1\n"
"ConnLimit 1\n"
"SchedulerHighWaterMark__ 42\n"
......@@ -1736,8 +1731,7 @@ test_options_validate__reachable_addresses(void *ignored)
free_options_test_data(tdata);
tdata = get_options_test_data("ClientUseIPv4 0\n"
"ORListenAddress 127.0.0.1:5555\n"
"ORPort 955\n"
"ORPort 127.0.0.1:5555\n"
"MaxClientCircuitsPending 1\n"
"ConnLimit 1\n"
"SchedulerHighWaterMark__ 42\n"
......@@ -1837,8 +1831,7 @@ test_options_validate__use_bridges(void *ignored)
options_test_data_t *tdata = get_options_test_data(
"UseBridges 1\n"
"ClientUseIPv4 1\n"
"ORListenAddress 127.0.0.1:5555\n"
"ORPort 955\n"
"ORPort 127.0.0.1:5555\n"
"MaxClientCircuitsPending 1\n"
"ConnLimit 1\n"
"SchedulerHighWaterMark__ 42\n"
......@@ -2398,8 +2391,7 @@ test_options_validate__bandwidth(void *ignored)
free_options_test_data(tdata);
tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
"ORListenAddress 127.0.0.1:5555\n"
"ORPort 955\n"
"ORPort 127.0.0.1:5555\n"
"BandwidthRate 1\n"
);
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
......@@ -2410,8 +2402,7 @@ test_options_validate__bandwidth(void *ignored)
free_options_test_data(tdata);
tdata = get_options_test_data(TEST_OPTIONS_DEFAULT_VALUES
"ORListenAddress 127.0.0.1:5555\n"
"ORPort 955\n"
"ORPort 127.0.0.1:5555\n"
"BandwidthRate 76800\n"