[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r10231: More bulletproofing on bug 429 (in tor/trunk: . src/or)



Author: nickm
Date: 2007-05-20 16:16:45 -0400 (Sun, 20 May 2007)
New Revision: 10231

Modified:
   tor/trunk/
   tor/trunk/src/or/router.c
   tor/trunk/src/or/routerlist.c
Log:
 r13023@Kushana:  nickm | 2007-05-20 16:16:36 -0400
 More bulletproofing on bug 429



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r13023] on c95137ef-5f19-0410-b913-86e773d04f59

Modified: tor/trunk/src/or/router.c
===================================================================
--- tor/trunk/src/or/router.c	2007-05-20 18:03:26 UTC (rev 10230)
+++ tor/trunk/src/or/router.c	2007-05-20 20:16:45 UTC (rev 10231)
@@ -1031,6 +1031,7 @@
 
   /* Now generate the extrainfo. */
   ei = tor_malloc_zero(sizeof(extrainfo_t));
+  ei->cache_info.is_extrainfo = 1;
   strlcpy(ei->nickname, get_options()->Nickname, sizeof(ei->nickname));
   ei->cache_info.published_on = ri->cache_info.published_on;
   memcpy(ei->cache_info.identity_digest, ri->cache_info.identity_digest,

Modified: tor/trunk/src/or/routerlist.c
===================================================================
--- tor/trunk/src/or/routerlist.c	2007-05-20 18:03:26 UTC (rev 10230)
+++ tor/trunk/src/or/routerlist.c	2007-05-20 20:16:45 UTC (rev 10231)
@@ -1798,6 +1798,12 @@
   extrainfo_t *ei_tmp;
   routerlist_check_bug_417();
 
+  {
+    /* XXXX020 remove this code once bug 417/404 is fixed. */
+    extrainfo_t *ei_generated = router_get_my_extrainfo();
+    tor_assert(ei_generated != ei);
+  }
+
   if (!ri) {
     /* This router is unknown; we can't even verify the signature. Give up.*/
     goto done;