mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 13:43:47 +01:00
Bug 19859: Consolidate flag fields into ISO_FIELDS
This commit is contained in:
parent
2734968e40
commit
0c4e3b6b50
@ -219,21 +219,34 @@ entry_connection_describe_status_for_controller(entry_connection_t *conn)
|
|||||||
conn->entry_cfg.session_group);
|
conn->entry_cfg.session_group);
|
||||||
|
|
||||||
// Show isolation flags.
|
// Show isolation flags.
|
||||||
smartlist_add_asprintf(descparts, "ISO_DESTPORT=%d",
|
smartlist_t *isoflaglist = smartlist_new();
|
||||||
(conn->entry_cfg.isolation_flags &
|
char *isoflaglist_joined;
|
||||||
ISO_DESTPORT) ? 1 : 0);
|
if (conn->entry_cfg.isolation_flags & ISO_DESTPORT) {
|
||||||
smartlist_add_asprintf(descparts, "ISO_DESTADDR=%d",
|
smartlist_add(isoflaglist, (void *)"DESTPORT");
|
||||||
(conn->entry_cfg.isolation_flags &
|
}
|
||||||
ISO_DESTADDR) ? 1 : 0);
|
if (conn->entry_cfg.isolation_flags & ISO_DESTADDR) {
|
||||||
smartlist_add_asprintf(descparts, "ISO_SOCKSAUTH=%d",
|
smartlist_add(isoflaglist, (void *)"DESTADDR");
|
||||||
(conn->entry_cfg.isolation_flags &
|
}
|
||||||
ISO_SOCKSAUTH) ? 1 : 0);
|
if (conn->entry_cfg.isolation_flags & ISO_SOCKSAUTH) {
|
||||||
smartlist_add_asprintf(descparts, "ISO_CLIENTPROTO=%d",
|
smartlist_add(isoflaglist, (void *)"SOCKS_USERNAME");
|
||||||
(conn->entry_cfg.isolation_flags &
|
smartlist_add(isoflaglist, (void *)"SOCKS_PASSWORD");
|
||||||
ISO_CLIENTPROTO) ? 1 : 0);
|
}
|
||||||
smartlist_add_asprintf(descparts, "ISO_CLIENTADDR=%d",
|
if (conn->entry_cfg.isolation_flags & ISO_CLIENTPROTO) {
|
||||||
(conn->entry_cfg.isolation_flags &
|
smartlist_add(isoflaglist, (void *)"CLIENT_PROTOCOL");
|
||||||
ISO_CLIENTADDR) ? 1 : 0);
|
}
|
||||||
|
if (conn->entry_cfg.isolation_flags & ISO_CLIENTADDR) {
|
||||||
|
smartlist_add(isoflaglist, (void *)"CLIENTADDR");
|
||||||
|
}
|
||||||
|
if (conn->entry_cfg.isolation_flags & ISO_SESSIONGRP) {
|
||||||
|
smartlist_add(isoflaglist, (void *)"SESSION_GROUP");
|
||||||
|
}
|
||||||
|
if (conn->entry_cfg.isolation_flags & ISO_NYM_EPOCH) {
|
||||||
|
smartlist_add(isoflaglist, (void *)"NYM_EPOCH");
|
||||||
|
}
|
||||||
|
isoflaglist_joined = smartlist_join_strings(isoflaglist, ",", 0, NULL);
|
||||||
|
smartlist_add_asprintf(descparts, "ISO_FIELDS=%s", isoflaglist_joined);
|
||||||
|
tor_free(isoflaglist_joined);
|
||||||
|
smartlist_free(isoflaglist);
|
||||||
|
|
||||||
rv = smartlist_join_strings(descparts, " ", 0, NULL);
|
rv = smartlist_join_strings(descparts, " ", 0, NULL);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user