소스 검색

Merge branch 'bug7493_redux'

Nick Mathewson 11 년 전
부모
커밋
ea893a3c30
1개의 변경된 파일7개의 추가작업 그리고 0개의 파일을 삭제
  1. 7 0
      src/or/connection.c

+ 7 - 0
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;
 }