[tor/master] Fixes on prop227 comments, based on comments by mcs on #10395

commit 1e61b45251bd2895e0448fcf283e4f7e05355f28 Author: Nick Mathewson <nickm@torproject.org> Date: Tue Jan 27 16:31:48 2015 -0500 Fixes on prop227 comments, based on comments by mcs on #10395 --- src/or/dirserv.c | 21 ++++++++++++++++++++- src/or/or.h | 2 +- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/or/dirserv.c b/src/or/dirserv.c index dbdfff1..4a6c506 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -3258,7 +3258,26 @@ connection_dirserv_flushed_some(dir_connection_t *conn) } } -/** Return true iff <b>line</b> is a valid recommened_packages line. +/** Return true iff <b>line</b> is a valid RecommenedPackages line. + */ +/* + The grammar is: + + "package" SP PACKAGENAME SP VERSION SP URL SP DIGESTS NL + + PACKAGENAME = NONSPACE + VERSION = NONSPACE + URL = NONSPACE + DIGESTS = DIGEST | DIGESTS SP DIGEST + DIGEST = DIGESTTYPE "=" DIGESTVAL + + NONSPACE = one or more non-space printing characters + + DIGESTVAL = any number of non-=, non-" " characters. + + SP = " " + NL = a newline + */ int validate_recommended_package_line(const char *line) diff --git a/src/or/or.h b/src/or/or.h index 228738f..33fc1a4 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -2456,7 +2456,7 @@ typedef struct networkstatus_t { /** Vote only: what methods is this voter willing to use? */ smartlist_t *supported_methods; - /** List of 'package' lines describing hashes of downloadable pacakges */ + /** List of 'package' lines describing hashes of downloadable packages */ smartlist_t *package_lines; /** How long does this vote/consensus claim that authorities take to
participants (1)
-
nickm@torproject.org