[or-cvs] when you get a desc from an unknown router, log its fingerp...

Roger Dingledine arma at seul.org
Mon Mar 8 00:15:43 UTC 2004


Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or

Modified Files:
	dirserv.c 
Log Message:
when you get a desc from an unknown router, log its fingerprint


Index: dirserv.c
===================================================================
RCS file: /home/or/cvsroot/src/or/dirserv.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- dirserv.c	5 Mar 2004 05:48:28 -0000	1.25
+++ dirserv.c	8 Mar 2004 00:15:40 -0000	1.26
@@ -228,7 +228,13 @@
   r = dirserv_router_fingerprint_is_known(ri);
   if(r<1) {
     if(r==0) {
+      char fp[FINGERPRINT_LEN+1];
       log_fn(LOG_WARN, "Unknown nickname %s. Not adding.", ri->nickname);
+      if (crypto_pk_get_fingerprint(ri->identity_pkey, fp) < 0) {
+        log_fn(LOG_WARN, "Error computing fingerprint for %s", ri->nickname);
+      } else {
+        log_fn(LOG_WARN, "Fingerprint line: %s %s", ri->nickname, fp);
+      }
     } else {
       log_fn(LOG_WARN, "Known nickname %s, wrong fingerprint. Not adding.", ri->nickname);
     }



More information about the tor-commits mailing list