mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-14 07:03:44 +01:00
Close orconns correctly through channels when setting DisableNetwork to 1
This commit is contained in:
parent
125c8e5468
commit
a5544e589d
4
changes/bug11306
Normal file
4
changes/bug11306
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
o Bugfixes:
|
||||||
|
- When closing all connections on setting DisableNetwork to 1, use
|
||||||
|
connection_or_close_normally() rather than closing orconns out from
|
||||||
|
under the channel layer. Fixes bug #11306.
|
@ -2359,6 +2359,20 @@ connection_mark_all_noncontrol_connections(void)
|
|||||||
connection_mark_unattached_ap(TO_ENTRY_CONN(conn),
|
connection_mark_unattached_ap(TO_ENTRY_CONN(conn),
|
||||||
END_STREAM_REASON_HIBERNATING);
|
END_STREAM_REASON_HIBERNATING);
|
||||||
break;
|
break;
|
||||||
|
case CONN_TYPE_OR:
|
||||||
|
{
|
||||||
|
or_connection_t *orconn = TO_OR_CONN(conn);
|
||||||
|
if (orconn->chan) {
|
||||||
|
connection_or_close_normally(orconn, 0);
|
||||||
|
} else {
|
||||||
|
/*
|
||||||
|
* There should have been one, but mark for close and hope
|
||||||
|
* for the best..
|
||||||
|
*/
|
||||||
|
connection_mark_for_close(conn);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
connection_mark_for_close(conn);
|
connection_mark_for_close(conn);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user