| 
														
															@@ -559,13 +559,16 @@ router_set_networkstatus_v2(const char *s, time_t arrived_at, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   format_iso_time(published, ns->published_on); 
														 | 
														
														 | 
														
															   format_iso_time(published, ns->published_on); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															   if (ns->published_on > now + NETWORKSTATUS_ALLOW_SKEW) { 
														 | 
														
														 | 
														
															   if (ns->published_on > now + NETWORKSTATUS_ALLOW_SKEW) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    log_warn(LD_GENERAL, "Network status from %s was published in the future " 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-             "(%s GMT). Check your system clock! " 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    char dbuf[64]; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    long delta = now - ns->published_on; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    format_time_interval(dbuf, sizeof(dbuf), delta); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    log_warn(LD_GENERAL, "Network status from %s was published %s in the " 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+             "future (%s GMT). Check your time and date settings! " 
														 | 
													
												
											
												
													
														| 
														 | 
														
															              "Not caching.", 
														 | 
														
														 | 
														
															              "Not caching.", 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-             source_desc, published); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+             source_desc, dbuf, published); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     control_event_general_status(LOG_WARN, 
														 | 
														
														 | 
														
															     control_event_general_status(LOG_WARN, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                                 "CLOCK_SKEW SOURCE=NETWORKSTATUS:%s:%d", 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                                 ns->source_address, ns->source_dirport); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                       "CLOCK_SKEW MIN_SKEW=%ld SOURCE=NETWORKSTATUS:%s:%d", 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                       delta, ns->source_address, ns->source_dirport); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     skewed = 1; 
														 | 
														
														 | 
														
															     skewed = 1; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   } 
														 | 
														
														 | 
														
															   } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -1329,12 +1332,17 @@ networkstatus_set_current_consensus(const char *consensus, int from_cache, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                                         current_consensus->valid_after); 
														 | 
														
														 | 
														
															                                         current_consensus->valid_after); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															   if (ftime_definitely_before(now, current_consensus->valid_after)) { 
														 | 
														
														 | 
														
															   if (ftime_definitely_before(now, current_consensus->valid_after)) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    char buf[ISO_TIME_LEN+1]; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    format_iso_time(buf, current_consensus->valid_after); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    log_warn(LD_GENERAL, "Consensus network status document was published " 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-             "at some time in the future (%s GMT).  Check your time and date " 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-             "settings!", buf); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    control_event_general_status(LOG_WARN, "CLOCK_SKEW SOURCE=CONSENSUS"); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    char tbuf[ISO_TIME_LEN+1]; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    char dbuf[64]; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    long delta = now - current_consensus->valid_after; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    format_iso_time(tbuf, current_consensus->valid_after); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    format_time_interval(dbuf, sizeof(dbuf), delta); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    log_warn(LD_GENERAL, "Our clock is %s behind the time published in the " 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+             "consensus network status document (%s GMT).  Tor needs an " 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+             "accurate clock to work correctly. Please check your time and " 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+             "date settings!", dbuf, tbuf); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    control_event_general_status(LOG_WARN, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    "CLOCK_SKEW MIN_SKEW=%ld SOURCE=CONSENSUS", delta); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   } 
														 | 
														
														 | 
														
															   } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															   router_dir_info_changed(); 
														 | 
														
														 | 
														
															   router_dir_info_changed(); 
														 |