|
@@ -17,6 +17,7 @@
|
|
|
#include "dirserv.h"
|
|
|
#include "dirvote.h"
|
|
|
#include "policies.h"
|
|
|
+#include "protover.h"
|
|
|
#include "rendcommon.h"
|
|
|
#include "router.h"
|
|
|
#include "routerlist.h"
|
|
@@ -2904,12 +2905,21 @@ routerstatus_parse_entry_from_string(memarea_t *area,
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ int found_protocol_list = 0;
|
|
|
+ if ((tok = find_opt_by_keyword(tokens, K_PROTO))) {
|
|
|
+ found_protocol_list = 1;
|
|
|
+ rs->protocols_known = 1;
|
|
|
+ rs->supports_extend2_cells =
|
|
|
+ protocol_list_supports_protocol(tok->args[0], PRT_RELAY, 2);
|
|
|
+ }
|
|
|
if ((tok = find_opt_by_keyword(tokens, K_V))) {
|
|
|
tor_assert(tok->n_args == 1);
|
|
|
rs->version_known = 1;
|
|
|
- if (strcmpstart(tok->args[0], "Tor ")) {
|
|
|
- } else {
|
|
|
- rs->version_supports_extend2_cells =
|
|
|
+ if (!strcmpstart(tok->args[0], "Tor ") && !found_protocol_list) {
|
|
|
+
|
|
|
+ * the version is a "Tor" version, and where there is no
|
|
|
+ * list of protocol versions that we should be looking at instead. */
|
|
|
+ rs->supports_extend2_cells =
|
|
|
tor_version_as_new_as(tok->args[0], "0.2.4.8-alpha");
|
|
|
}
|
|
|
if (vote_rs) {
|