Merge remote-tracking branch 'rransom-tor/bug4018'

This commit is contained in:
Nick Mathewson 2011-10-07 16:32:04 -04:00
commit b49fcc6cf2
2 changed files with 10 additions and 2 deletions

View File

@ -0,0 +1,7 @@
o Minor bugfixes:
- Don't warn users that they are exposing a client port to the
Internet if they have specified an RFC1918 address. Previously,
we would warn if the user had specified any non-loopback
address. Bugfix on 0.2.3.3-alpha. Fixes bug 4018; reported by Tas.

View File

@ -5119,12 +5119,13 @@ port_cfg_free(port_cfg_t *port)
tor_free(port);
}
/** Warn for every port in <b>ports</b> that is not on a loopback address. */
/** Warn for every port in <b>ports</b> that is on a publicly routable
* address. */
static void
warn_nonlocal_client_ports(const smartlist_t *ports, const char *portname)
{
SMARTLIST_FOREACH_BEGIN(ports, const port_cfg_t *, port) {
if (!tor_addr_is_loopback(&port->addr)) {
if (!tor_addr_is_internal(&port->addr, 1)) {
log_warn(LD_CONFIG, "You specified a public address for %sPort. "
"Other people on the Internet might find your computer and "
"use it as an open proxy. Please don't allow this unless you "