[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r9180: Stop requiring the "opt" keyword before unrecognized directo (in tor/trunk: . doc src/or)
- To: or-cvs@xxxxxxxxxxxxx
- Subject: [or-cvs] r9180: Stop requiring the "opt" keyword before unrecognized directo (in tor/trunk: . doc src/or)
- From: nickm@xxxxxxxx
- Date: Sat, 23 Dec 2006 23:09:44 -0500 (EST)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Sat, 23 Dec 2006 23:09:51 -0500
- Reply-to: or-talk@xxxxxxxxxxxxx
- Sender: owner-or-cvs@xxxxxxxxxxxxx
Author: nickm
Date: 2006-12-23 23:09:42 -0500 (Sat, 23 Dec 2006)
New Revision: 9180
Modified:
tor/trunk/
tor/trunk/ChangeLog
tor/trunk/doc/TODO
tor/trunk/src/or/routerparse.c
Log:
r11693@Kushana: nickm | 2006-12-23 22:42:11 -0500
Stop requiring the "opt" keyword before unrecognized directory items.
Property changes on: tor/trunk
___________________________________________________________________
svk:merge ticket from /tor/trunk [r11693] on c95137ef-5f19-0410-b913-86e773d04f59
Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog 2006-12-24 04:09:39 UTC (rev 9179)
+++ tor/trunk/ChangeLog 2006-12-24 04:09:42 UTC (rev 9180)
@@ -48,6 +48,8 @@
- We no longer look for identity and onion keys in "identity.key" and
"onion.key" -- these were replaced by secret_id_key and
secret_onion_key in 0.0.8pre1.
+ - We no longer require unrecognized directory entries to be preceded by
+ "opt".
o Security bugfixes:
- Stop sending the HttpProxyAuthenticator string to directory
Modified: tor/trunk/doc/TODO
===================================================================
--- tor/trunk/doc/TODO 2006-12-24 04:09:39 UTC (rev 9179)
+++ tor/trunk/doc/TODO 2006-12-24 04:09:42 UTC (rev 9180)
@@ -196,7 +196,11 @@
- Stop requiring "opt" to ignore options in descriptors, networkstatuses,
and so on.
- Caches should start trying to cache consensus docs?
- - Start uploading short and long descriptors?
+ - Start uploading short and long descriptors; authorities should support
+ URLs to retrieve long descriptors, and should discard short descriptors
+ for now. Later, once tools use the "long descriptor" URLs, authorities
+ will serve the short descriptors every time they're asked for
+ a descriptor.
Topics to think about during 0.1.2.x development:
* Figure out incentives.
Modified: tor/trunk/src/or/routerparse.c
===================================================================
--- tor/trunk/src/or/routerparse.c 2006-12-24 04:09:39 UTC (rev 9179)
+++ tor/trunk/src/or/routerparse.c 2006-12-24 04:09:42 UTC (rev 9180)
@@ -467,11 +467,6 @@
if (tokenize_string(str,str+strlen(str),tokens,DIR)) {
log_warn(LD_DIR, "Error tokenizing running-routers"); goto err;
}
- if ((tok = find_first_by_keyword(tokens, _UNRECOGNIZED))) {
- log_warn(LD_DIR, "Unrecognized keyword %s; can't parse running-routers",
- escaped(tok->args[0]));
- goto err;
- }
tok = smartlist_get(tokens,0);
if (tok->tp != K_NETWORK_STATUS) {
log_warn(LD_DIR, "Network-status starts with wrong token");
@@ -759,13 +754,6 @@
log_warn(LD_DIR, "Impossibly short router descriptor.");
goto err;
}
- if ((tok = find_first_by_keyword(tokens, _UNRECOGNIZED))) {
- log_warn(LD_DIR,
- "Unrecognized critical keyword %s; skipping descriptor. "
- "(It may be from another version of Tor.)",
- escaped(tok->args[0]));
- goto err;
- }
tok = smartlist_get(tokens,0);
if (tok->tp != K_ROUTER) {
@@ -1018,11 +1006,6 @@
log_warn(LD_DIR, "Impossibly short router status");
goto err;
}
- if ((tok = find_first_by_keyword(tokens, _UNRECOGNIZED))) {
- log_warn(LD_DIR, "Unrecognized keyword %s in router status; skipping.",
- escaped(tok->args[0]));
- goto err;
- }
if (!(tok = find_first_by_keyword(tokens, K_R))) {
log_warn(LD_DIR, "Missing 'r' keywork in router status; skipping.");
goto err;
@@ -1156,11 +1139,6 @@
log_warn(LD_DIR, "Error tokenizing network-status header.");
goto err;
}
- if ((tok = find_first_by_keyword(tokens, _UNRECOGNIZED))) {
- log_warn(LD_DIR, "Unrecognized keyword %s; can't parse network-status",
- escaped(tok->args[0]));
- goto err;
- }
ns = tor_malloc_zero(sizeof(networkstatus_t));
memcpy(ns->networkstatus_digest, ns_digest, DIGEST_LEN);
@@ -1629,29 +1607,16 @@
}
}
if (tok->tp == _ERR) {
- if (is_opt) {
- tok->tp = K_OPT;
- *s = eat_whitespace_no_nl(next);
- next = strchr(*s,'\n');
- if (!next)
- RET_ERR("Unexpected EOF");
- tok->args = tor_malloc(sizeof(char*));
- tok->args[0] = tor_strndup(*s,next-*s);
- tok->n_args = 1;
- *s = eat_whitespace_no_nl(next+1);
- o_syn = OBJ_OK;
- } else {
- tok->tp = _UNRECOGNIZED;
- next = strchr(*s, '\n');
- if (!next) {
- RET_ERR("Unexpected EOF");
- }
- tok->args = tor_malloc(sizeof(char*));
- tok->args[0] = tor_strndup(*s,next-*s);
- tok->n_args = 1;
- *s = next+1;
- o_syn = OBJ_OK;
- }
+ tok->tp = K_OPT;
+ *s = eat_whitespace_no_nl(next);
+ next = strchr(*s,'\n');
+ if (!next)
+ RET_ERR("Unexpected EOF");
+ tok->args = tor_malloc(sizeof(char*));
+ tok->args[0] = tor_strndup(*s,next-*s);
+ tok->n_args = 1;
+ *s = eat_whitespace_no_nl(next+1);
+ o_syn = OBJ_OK;
}
*s = eat_whitespace(*s);
if (strcmpstart(*s, "-----BEGIN ")) {