diff options
author | David Goulet <dgoulet@torproject.org> | 2023-08-25 16:55:40 +0000 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2023-08-25 16:55:40 +0000 |
commit | 4f21fc0fe4d54d61983dc44d2ea27786bbe3edbf (patch) | |
tree | 85d18caad4738c127fdbbfddb7460d66ce24d7b6 /src/app/config | |
parent | 99a19a0da6c7cf3af14682c554b01ff2d695f314 (diff) | |
parent | bb16c1b02075f523e1aa7589c549786f071b1573 (diff) | |
download | tor-4f21fc0fe4d54d61983dc44d2ea27786bbe3edbf.tar.gz tor-4f21fc0fe4d54d61983dc44d2ea27786bbe3edbf.zip |
Merge branch 'reapply-exit-policy-on-reload' into 'main'
reapply exit policy on reload
Closes #40676
See merge request tpo/core/tor!735
Diffstat (limited to 'src/app/config')
-rw-r--r-- | src/app/config/config.c | 2 | ||||
-rw-r--r-- | src/app/config/or_options_st.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/app/config/config.c b/src/app/config/config.c index a10329c552..ae7f6203ce 100644 --- a/src/app/config/config.c +++ b/src/app/config/config.c @@ -637,6 +637,7 @@ static const config_var_t option_vars_[] = { V(RephistTrackTime, INTERVAL, "24 hours"), V_IMMUTABLE(RunAsDaemon, BOOL, "0"), V(ReducedExitPolicy, BOOL, "0"), + V(ReevaluateExitPolicy, BOOL, "0"), OBSOLETE("RunTesting"), // currently unused V_IMMUTABLE(Sandbox, BOOL, "0"), V(SafeLogging, STRING, "1"), @@ -996,6 +997,7 @@ set_options(or_options_t *new_val, char **msg) config_line_t *changes = config_get_changes(get_options_mgr(), old_options, new_val); control_event_conf_changed(changes); + connection_reapply_exit_policy(changes); config_free_lines(changes); } diff --git a/src/app/config/or_options_st.h b/src/app/config/or_options_st.h index 36b00662b5..624dc61bc5 100644 --- a/src/app/config/or_options_st.h +++ b/src/app/config/or_options_st.h @@ -141,6 +141,8 @@ struct or_options_t { * Includes OutboundBindAddresses and * configured ports. */ int ReducedExitPolicy; /**<Should we use the Reduced Exit Policy? */ + int ReevaluateExitPolicy; /**<Should we re-evaluate Exit Policy on existing + * connections when it changes? */ struct config_line_t *SocksPolicy; /**< Lists of socks policy components */ struct config_line_t *DirPolicy; /**< Lists of dir policy components */ /** Local address to bind outbound sockets */ |