diff options
author | Yawning Angel <yawning@schwanenlied.me> | 2015-06-04 13:53:35 +0000 |
---|---|---|
committer | Yawning Angel <yawning@schwanenlied.me> | 2015-06-04 13:53:35 +0000 |
commit | f2ff8145820243a05803367d31c8b34e03048706 (patch) | |
tree | 756e2a0daea2fc0c3beab408962504218a1df52e | |
parent | a68e5323f809056cae9fcefc06357f9646595d89 (diff) | |
download | tor-f2ff8145820243a05803367d31c8b34e03048706.tar.gz tor-f2ff8145820243a05803367d31c8b34e03048706.zip |
Set session_group after the port's data structure has been populated.
Fixes #16247, patch by "jojelino".
-rw-r--r-- | changes/bug16247 | 5 | ||||
-rw-r--r-- | src/or/connection.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/changes/bug16247 b/changes/bug16247 new file mode 100644 index 0000000000..9464b1cb24 --- /dev/null +++ b/changes/bug16247 @@ -0,0 +1,5 @@ + o Minor bugfixes (client-side privacy): + - Properly separate out each SOCKSPort when applying stream isolation. + The error occured because each port's session group was being + overwritten by a default value. Fixes bug 16247; bugfix on + 0.2.6.3-alpha. Patch by "jojelino". diff --git a/src/or/connection.c b/src/or/connection.c index 7db0238b3d..721ee20d27 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -1284,6 +1284,8 @@ connection_listener_new(const struct sockaddr *listensockaddr, conn->port = gotPort; tor_addr_copy(&conn->addr, &addr); + memcpy(&lis_conn->entry_cfg, &port_cfg->entry_cfg, sizeof(entry_port_cfg_t)); + if (port_cfg->entry_cfg.isolation_flags) { lis_conn->entry_cfg.isolation_flags = port_cfg->entry_cfg.isolation_flags; if (port_cfg->entry_cfg.session_group >= 0) { @@ -1299,8 +1301,6 @@ connection_listener_new(const struct sockaddr *listensockaddr, } } - memcpy(&lis_conn->entry_cfg, &port_cfg->entry_cfg, sizeof(entry_port_cfg_t)); - if (type != CONN_TYPE_AP_LISTENER) { lis_conn->entry_cfg.ipv4_traffic = 1; lis_conn->entry_cfg.ipv6_traffic = 1; |