mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Merge branch 'bug6710_023' into maint-0.2.3
This commit is contained in:
@@ -2432,6 +2432,13 @@ circuit_extend(cell_t *cell, circuit_t *circ)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (tor_addr_is_internal(&n_addr, 0) &&
|
||||
!get_options()->ExtendAllowPrivateAddresses) {
|
||||
log_fn(LOG_PROTOCOL_WARN, LD_PROTOCOL,
|
||||
"Client asked me to extend to a private address");
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Check if they asked us for 0000..0000. We support using
|
||||
* an empty fingerprint for the first hop (e.g. for a bridge relay),
|
||||
* but we don't want to let people send us extend cells for empty
|
||||
|
||||
@@ -276,6 +276,7 @@ static config_var_t _option_vars[] = {
|
||||
V(ExitPolicy, LINELIST, NULL),
|
||||
V(ExitPolicyRejectPrivate, BOOL, "1"),
|
||||
V(ExitPortStatistics, BOOL, "0"),
|
||||
V(ExtendAllowPrivateAddresses, BOOL, "0"),
|
||||
V(ExtraInfoStatistics, BOOL, "1"),
|
||||
|
||||
#if defined (WINCE)
|
||||
@@ -473,6 +474,7 @@ static const config_var_t testing_tor_network_defaults[] = {
|
||||
V(ClientRejectInternalAddresses, BOOL, "0"),
|
||||
V(CountPrivateBandwidth, BOOL, "1"),
|
||||
V(ExitPolicyRejectPrivate, BOOL, "0"),
|
||||
V(ExtendAllowPrivateAddresses, BOOL, "1"),
|
||||
V(V3AuthVotingInterval, INTERVAL, "5 minutes"),
|
||||
V(V3AuthVoteDelay, INTERVAL, "20 seconds"),
|
||||
V(V3AuthDistDelay, INTERVAL, "20 seconds"),
|
||||
|
||||
+3
-1
@@ -3029,8 +3029,10 @@ typedef struct {
|
||||
config_line_t *RecommendedVersions;
|
||||
config_line_t *RecommendedClientVersions;
|
||||
config_line_t *RecommendedServerVersions;
|
||||
/** Whether dirservers refuse router descriptors with private IPs. */
|
||||
/** Whether dirservers allow router descriptors with private IPs. */
|
||||
int DirAllowPrivateAddresses;
|
||||
/** Whether routers accept EXTEND cells to routers with private IPs. */
|
||||
int ExtendAllowPrivateAddresses;
|
||||
char *User; /**< Name of user to run Tor as. */
|
||||
char *Group; /**< Name of group to run Tor as. */
|
||||
config_line_t *ORPort_lines; /**< Ports to listen on for OR connections. */
|
||||
|
||||
Reference in New Issue
Block a user