diff options
author | Nick Mathewson <nickm@torproject.org> | 2019-05-23 08:24:29 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2019-05-23 08:24:29 -0400 |
commit | 57ee0e3af98e5dce398e8bc7f6f2b77e53208288 (patch) | |
tree | 0d0f73d63cf16c36c645cbe6f506633d23c15b98 /src/feature/control/control_cmd.c | |
parent | ebe39dcb9225ffe43c6b6d2fe49d4b99d155ff33 (diff) | |
download | tor-57ee0e3af98e5dce398e8bc7f6f2b77e53208288.tar.gz tor-57ee0e3af98e5dce398e8bc7f6f2b77e53208288.zip |
Only reject POSTDESCRIPTOR purpose= when the purpose is unrecognized
Fixes bug 30580; bugfix on 0.4.1.1-alpha.
Diffstat (limited to 'src/feature/control/control_cmd.c')
-rw-r--r-- | src/feature/control/control_cmd.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/feature/control/control_cmd.c b/src/feature/control/control_cmd.c index 5555a2c5c4..17d5b0c7f3 100644 --- a/src/feature/control/control_cmd.c +++ b/src/feature/control/control_cmd.c @@ -1049,9 +1049,11 @@ handle_control_postdescriptor(control_connection_t *conn, line = config_line_find_case(args->kwargs, "purpose"); if (line) { purpose = router_purpose_from_string(line->value); - control_printf_endreply(conn, 552, "Unknown purpose \"%s\"", - line->value); - goto done; + if (purpose == ROUTER_PURPOSE_UNKNOWN) { + control_printf_endreply(conn, 552, "Unknown purpose \"%s\"", + line->value); + goto done; + } } line = config_line_find_case(args->kwargs, "cache"); if (line) { |