Ver código fonte

It is not the end of the world when a router descriptor has an unrecognized kwd

svn:r4480
Nick Mathewson 20 anos atrás
pai
commit
b759fe4b8d
2 arquivos alterados com 9 adições e 4 exclusões
  1. 8 3
      doc/tor-spec.txt
  2. 1 1
      src/or/routerparse.c

+ 8 - 3
doc/tor-spec.txt

@@ -852,9 +852,14 @@ after "directory-signature".  This digest is then padded with PKCS.1,
 and signed with the directory server's signing key.
 
 If software encounters an unrecognized keyword in a single router descriptor,
-it should reject only that router descriptor, and continue using the
-others.  If it encounters an unrecognized keyword in the directory header,
-it should reject the entire directory.
+it MUST reject only that router descriptor, and continue using the
+others.  Because this mechanism is used to add 'critical' extensions to
+future versions of the router descriptor format, implementation should treat
+it as a normal occurrence and not, for example, report it to the user as an
+error.  [Versions of Tor prior to 0.1.1 did this.]
+
+If software encounters an unrecognized keyword in the directory header,
+it SHOULD reject the entire directory.
 
 7.4. Network-status descriptor
 

+ 1 - 1
src/or/routerparse.c

@@ -853,7 +853,7 @@ router_parse_entry_from_string(const char *s, const char *end)
     goto err;
   }
   if ((tok = find_first_by_keyword(tokens, _UNRECOGNIZED))) {
-    log_fn(LOG_WARN, "Unrecognized keyword '%s'; skipping descriptor.",
+    log_fn(LOG_INFO, "Unrecognized critical keyword '%s'; skipping descriptor. (It may be from another version of Tor.)",
            tok->args[0]);
     goto err;
   }