Loading src/or/control.c +1 −0 Original line number Diff line number Diff line Loading @@ -1706,6 +1706,7 @@ getinfo_helper_events(control_connection_t *control_conn, case VS_NEW: *answer = tor_strdup("new"); break; case VS_NEW_IN_SERIES: *answer = tor_strdup("new in series"); break; case VS_UNRECOMMENDED: *answer = tor_strdup("unrecommended"); break; case VS_EMPTY: *answer = tor_strdup("none recommended"); break; case VS_UNKNOWN: *answer = tor_strdup("unknown"); break; default: tor_fragile_assert(); } Loading src/or/networkstatus.c +3 −0 Original line number Diff line number Diff line Loading @@ -1577,6 +1577,9 @@ routers_update_all_from_networkstatus(time_t now, int dir_version) if (status == VS_RECOMMENDED) { log_info(LD_GENERAL, "The directory authorities say my version is ok."); } else if (status == VS_EMPTY) { log_info(LD_GENERAL, "The directory authorities don't recommend any versions."); } else if (status == VS_NEW || status == VS_NEW_IN_SERIES) { if (!have_warned_about_new_version) { log_notice(LD_GENERAL, "This version of Tor (%s) is newer than any " Loading src/or/or.h +1 −0 Original line number Diff line number Diff line Loading @@ -3317,6 +3317,7 @@ typedef enum version_status_t { * in its series, but later recommended versions exist. */ VS_UNRECOMMENDED=4, /**< This version is not recommended (general case). */ VS_EMPTY=5, /**< The version list was empty; no agreed-on versions. */ VS_UNKNOWN, /**< We have no idea. */ } version_status_t; Loading src/or/routerparse.c +8 −2 Original line number Diff line number Diff line Loading @@ -280,7 +280,7 @@ static token_rule_t dir_footer_token_table[] = { END_OF_TABLE }; /** List of tokens allowable in v1 diectory headers/footers. */ /** List of tokens allowable in v1 directory headers/footers. */ static token_rule_t dir_token_table[] = { /* don't enforce counts; this is obsolete. */ T( "network-status", K_NETWORK_STATUS, NO_ARGS, NO_OBJ ), Loading Loading @@ -538,7 +538,8 @@ router_append_dirobj_signature(char *buf, size_t buf_len, const char *digest, } /** Return VS_RECOMMENDED if <b>myversion</b> is contained in * <b>versionlist</b>. Else, return VS_OLD if every member of * <b>versionlist</b>. Else, return VS_EMPTY if versionlist has no * entries. Else, return VS_OLD if every member of * <b>versionlist</b> is newer than <b>myversion</b>. Else, return * VS_NEW_IN_SERIES if there is at least one member of <b>versionlist</b> in * the same series (major.minor.micro) as <b>myversion</b>, but no such member Loading Loading @@ -569,6 +570,11 @@ tor_version_is_obsolete(const char *myversion, const char *versionlist) version_sl = smartlist_create(); smartlist_split_string(version_sl, versionlist, ",", SPLIT_SKIP_SPACE, 0); if (!strlen(versionlist)) { /* no authorities cared or agreed */ ret = VS_EMPTY; goto done; } SMARTLIST_FOREACH(version_sl, const char *, cp, { if (!strcmpstart(cp, "Tor ")) cp += 4; Loading Loading
src/or/control.c +1 −0 Original line number Diff line number Diff line Loading @@ -1706,6 +1706,7 @@ getinfo_helper_events(control_connection_t *control_conn, case VS_NEW: *answer = tor_strdup("new"); break; case VS_NEW_IN_SERIES: *answer = tor_strdup("new in series"); break; case VS_UNRECOMMENDED: *answer = tor_strdup("unrecommended"); break; case VS_EMPTY: *answer = tor_strdup("none recommended"); break; case VS_UNKNOWN: *answer = tor_strdup("unknown"); break; default: tor_fragile_assert(); } Loading
src/or/networkstatus.c +3 −0 Original line number Diff line number Diff line Loading @@ -1577,6 +1577,9 @@ routers_update_all_from_networkstatus(time_t now, int dir_version) if (status == VS_RECOMMENDED) { log_info(LD_GENERAL, "The directory authorities say my version is ok."); } else if (status == VS_EMPTY) { log_info(LD_GENERAL, "The directory authorities don't recommend any versions."); } else if (status == VS_NEW || status == VS_NEW_IN_SERIES) { if (!have_warned_about_new_version) { log_notice(LD_GENERAL, "This version of Tor (%s) is newer than any " Loading
src/or/or.h +1 −0 Original line number Diff line number Diff line Loading @@ -3317,6 +3317,7 @@ typedef enum version_status_t { * in its series, but later recommended versions exist. */ VS_UNRECOMMENDED=4, /**< This version is not recommended (general case). */ VS_EMPTY=5, /**< The version list was empty; no agreed-on versions. */ VS_UNKNOWN, /**< We have no idea. */ } version_status_t; Loading
src/or/routerparse.c +8 −2 Original line number Diff line number Diff line Loading @@ -280,7 +280,7 @@ static token_rule_t dir_footer_token_table[] = { END_OF_TABLE }; /** List of tokens allowable in v1 diectory headers/footers. */ /** List of tokens allowable in v1 directory headers/footers. */ static token_rule_t dir_token_table[] = { /* don't enforce counts; this is obsolete. */ T( "network-status", K_NETWORK_STATUS, NO_ARGS, NO_OBJ ), Loading Loading @@ -538,7 +538,8 @@ router_append_dirobj_signature(char *buf, size_t buf_len, const char *digest, } /** Return VS_RECOMMENDED if <b>myversion</b> is contained in * <b>versionlist</b>. Else, return VS_OLD if every member of * <b>versionlist</b>. Else, return VS_EMPTY if versionlist has no * entries. Else, return VS_OLD if every member of * <b>versionlist</b> is newer than <b>myversion</b>. Else, return * VS_NEW_IN_SERIES if there is at least one member of <b>versionlist</b> in * the same series (major.minor.micro) as <b>myversion</b>, but no such member Loading Loading @@ -569,6 +570,11 @@ tor_version_is_obsolete(const char *myversion, const char *versionlist) version_sl = smartlist_create(); smartlist_split_string(version_sl, versionlist, ",", SPLIT_SKIP_SPACE, 0); if (!strlen(versionlist)) { /* no authorities cared or agreed */ ret = VS_EMPTY; goto done; } SMARTLIST_FOREACH(version_sl, const char *, cp, { if (!strcmpstart(cp, "Tor ")) cp += 4; Loading