aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-11-18 18:46:57 -0500
committerNick Mathewson <nickm@torproject.org>2012-11-18 18:46:57 -0500
commitea893a3c30d0e2ed9198258f65ed30e48da69ebe (patch)
tree65e75bb63d772537f184e158e0d294a8ca86d09b
parent06d367ea365ff3e6c1e181567906a9cb319a87c3 (diff)
parentbfe8d829c2bcfe24e1bdfe616444f074fe0f549c (diff)
downloadtor-ea893a3c30d0e2ed9198258f65ed30e48da69ebe.tar
tor-ea893a3c30d0e2ed9198258f65ed30e48da69ebe.tar.gz
Merge branch 'bug7493_redux'
-rw-r--r--src/or/connection.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index f9d8a6dbf..dbcfc41d2 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -281,6 +281,13 @@ entry_connection_new(int type, int socket_family)
tor_assert(type == CONN_TYPE_AP);
connection_init(time(NULL), ENTRY_TO_CONN(entry_conn), type, socket_family);
entry_conn->socks_request = socks_request_new();
+ /* If this is coming from a listener, we'll set it up based on the listener
+ * in a little while. Otherwise, we're doing this as a linked connection
+ * of some kind, and we should set it up here based on the socket family */
+ if (socket_family == AF_INET)
+ entry_conn->ipv4_traffic_ok = 1;
+ else if (socket_family == AF_INET6)
+ entry_conn->ipv6_traffic_ok = 1;
return entry_conn;
}