aboutsummaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorAndrea Shepard <andrea@torproject.org>2015-01-13 00:18:17 +0000
committerAndrea Shepard <andrea@torproject.org>2015-01-13 00:18:17 +0000
commitcb047f40786bf87f7fb17a500ca35eca9ba34f7c (patch)
tree5f7304be80226964271d5545318305a381d654a2 /src/or/config.c
parentf50068b17e77f9749fe798ef46124baa811d5b0a (diff)
downloadtor-cb047f40786bf87f7fb17a500ca35eca9ba34f7c.tar.gz
tor-cb047f40786bf87f7fb17a500ca35eca9ba34f7c.zip
Fix ipv4/ipv6 traffic bits on AF_UNIX socks listeners and remove hacky workarounds for brokenness
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/or/config.c b/src/or/config.c
index aea0498712..219200f799 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -6053,6 +6053,20 @@ parse_unix_socket_config(smartlist_t *out, smartlist_t *defaults,
port->is_unix_addr = 1;
memcpy(port->unix_addr, cfg->value, len+1);
port->type = listener_type;
+ if (listener_type == CONN_TYPE_AP_LISTENER) {
+ /* Some more bits to twiddle for this case
+ *
+ * XXX this should support parsing the same options
+ * parse_port_config() does, and probably that code should be
+ * factored out into a function we can call from here. For
+ * now, some reasonable defaults.
+ */
+
+ port->ipv4_traffic = 1;
+ port->ipv6_traffic = 1;
+ port->cache_ipv4_answers = 1;
+ port->cache_ipv6_answers = 1;
+ }
smartlist_add(ports_to_add, port);
} else {
/* Keep track that we've seen a disable */