[tor-commits] [tor/master] Extract routerinfo_t into its own header.

nickm at torproject.org nickm at torproject.org
Mon Jun 18 18:18:43 UTC 2018


commit ed0731c7ded26d84975411f4a0e35f2500f3eb2a
Author: Nick Mathewson <nickm at torproject.org>
Date:   Fri Jun 15 14:49:15 2018 -0400

    Extract routerinfo_t into its own header.
    
    I was expecting this to be much worse.
---
 src/or/bridges.c               |   1 +
 src/or/channeltls.c            |   1 +
 src/or/circuitbuild.c          |   1 +
 src/or/connection.c            |   1 +
 src/or/connection_or.c         |   1 +
 src/or/control.c               |   1 +
 src/or/dirauth/dirvote.c       |   1 +
 src/or/directory.c             |   1 +
 src/or/dirserv.c               |   1 +
 src/or/include.am              |   1 +
 src/or/main.c                  |   1 +
 src/or/networkstatus.c         |   1 +
 src/or/nodelist.c              |   1 +
 src/or/or.h                    |  95 +------------------------------------
 src/or/policies.c              |   1 +
 src/or/relay.c                 |   1 +
 src/or/router.c                |   1 +
 src/or/routerinfo_st.h         | 105 +++++++++++++++++++++++++++++++++++++++++
 src/or/routerlist.c            |   1 +
 src/or/routerparse.c           |   1 +
 src/or/routerset.c             |   1 +
 src/or/status.c                |   2 +
 src/test/test_address_set.c    |   1 +
 src/test/test_config.c         |   1 +
 src/test/test_connection.c     |   1 +
 src/test/test_dir.c            |   1 +
 src/test/test_dir_common.c     |   1 +
 src/test/test_dir_handle_get.c |   1 +
 src/test/test_entrynodes.c     |   1 +
 src/test/test_hs.c             |   1 +
 src/test/test_hs_common.c      |   1 +
 src/test/test_hs_service.c     |   1 +
 src/test/test_microdesc.c      |   1 +
 src/test/test_nodelist.c       |   1 +
 src/test/test_policy.c         |   1 +
 src/test/test_rendcache.c      |   1 +
 src/test/test_router.c         |   2 +
 src/test/test_routerset.c      |   1 +
 src/test/test_status.c         |   1 +
 39 files changed, 145 insertions(+), 94 deletions(-)

diff --git a/src/or/bridges.c b/src/or/bridges.c
index 3108e1495..013c45cd5 100644
--- a/src/or/bridges.c
+++ b/src/or/bridges.c
@@ -28,6 +28,7 @@
 #include "transports.h"
 
 #include "node_st.h"
+#include "routerinfo_st.h"
 #include "routerstatus_st.h"
 
 /** Information about a configured bridge. Currently this just matches the
diff --git a/src/or/channeltls.c b/src/or/channeltls.c
index 4d5677821..dd0c1628c 100644
--- a/src/or/channeltls.c
+++ b/src/or/channeltls.c
@@ -63,6 +63,7 @@
 #include "or_connection_st.h"
 #include "or_handshake_certs_st.h"
 #include "or_handshake_state_st.h"
+#include "routerinfo_st.h"
 
 /** How many CELL_PADDING cells have we received, ever? */
 uint64_t stats_n_padding_cells_processed = 0;
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index b871bd10c..103dd6eb9 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -71,6 +71,7 @@
 #include "or_circuit_st.h"
 #include "origin_circuit_st.h"
 #include "microdesc_st.h"
+#include "routerinfo_st.h"
 #include "routerstatus_st.h"
 
 static channel_t * channel_connect_for_circuit(const tor_addr_t *addr,
diff --git a/src/or/connection.c b/src/or/connection.c
index 283f09652..6e133f8d4 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -119,6 +119,7 @@
 #include "listener_connection_st.h"
 #include "or_connection_st.h"
 #include "port_cfg_st.h"
+#include "routerinfo_st.h"
 #include "socks_request_st.h"
 
 static connection_t *connection_listener_new(
diff --git a/src/or/connection_or.c b/src/or/connection_or.c
index 070253dce..1810c3954 100644
--- a/src/or/connection_or.c
+++ b/src/or/connection_or.c
@@ -64,6 +64,7 @@
 #include "or_connection_st.h"
 #include "or_handshake_certs_st.h"
 #include "or_handshake_state_st.h"
+#include "routerinfo_st.h"
 
 static int connection_tls_finish_handshake(or_connection_t *conn);
 static int connection_or_launch_v3_or_handshake(or_connection_t *conn);
diff --git a/src/or/control.c b/src/or/control.c
index 642d38774..520b6178f 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -94,6 +94,7 @@
 #include "rend_authorized_client_st.h"
 #include "rend_encoded_v2_service_descriptor_st.h"
 #include "rend_service_descriptor_st.h"
+#include "routerinfo_st.h"
 #include "routerlist_st.h"
 #include "socks_request_st.h"
 
diff --git a/src/or/dirauth/dirvote.c b/src/or/dirauth/dirvote.c
index 73fa07bfe..94a6139f5 100644
--- a/src/or/dirauth/dirvote.c
+++ b/src/or/dirauth/dirvote.c
@@ -36,6 +36,7 @@
 #include "networkstatus_voter_info_st.h"
 #include "node_st.h"
 #include "ns_detached_signatures_st.h"
+#include "routerinfo_st.h"
 #include "routerlist_st.h"
 #include "vote_microdesc_hash_st.h"
 #include "vote_routerstatus_st.h"
diff --git a/src/or/directory.c b/src/or/directory.c
index f3080bc1f..4e2e96886 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -61,6 +61,7 @@
 #include "networkstatus_st.h"
 #include "node_st.h"
 #include "rend_service_descriptor_st.h"
+#include "routerinfo_st.h"
 
 /**
  * \file directory.c
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index 8cfccda61..e54782d19 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -40,6 +40,7 @@
 #include "extrainfo_st.h"
 #include "microdesc_st.h"
 #include "node_st.h"
+#include "routerinfo_st.h"
 #include "routerlist_st.h"
 #include "tor_version_st.h"
 #include "vote_routerstatus_st.h"
diff --git a/src/or/include.am b/src/or/include.am
index 564af4ba4..468b231f7 100644
--- a/src/or/include.am
+++ b/src/or/include.am
@@ -296,6 +296,7 @@ ORHEADERS = \
 	src/or/rephist.h				\
 	src/or/replaycache.h				\
 	src/or/router.h					\
+	src/or/routerinfo_st.h				\
 	src/or/routerkeys.h				\
 	src/or/routerlist.h				\
 	src/or/routerlist_st.h				\
diff --git a/src/or/main.c b/src/or/main.c
index 73c23ee98..664105046 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -126,6 +126,7 @@
 #include "networkstatus_st.h"
 #include "or_connection_st.h"
 #include "port_cfg_st.h"
+#include "routerinfo_st.h"
 #include "socks_request_st.h"
 
 #ifdef HAVE_SYSTEMD
diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c
index 1951414a8..dd994f085 100644
--- a/src/or/networkstatus.c
+++ b/src/or/networkstatus.c
@@ -82,6 +82,7 @@
 #include "networkstatus_voter_info_st.h"
 #include "ns_detached_signatures_st.h"
 #include "node_st.h"
+#include "routerinfo_st.h"
 #include "routerlist_st.h"
 #include "vote_microdesc_hash_st.h"
 #include "vote_routerstatus_st.h"
diff --git a/src/or/nodelist.c b/src/or/nodelist.c
index 91d100336..5e575e9a8 100644
--- a/src/or/nodelist.c
+++ b/src/or/nodelist.c
@@ -72,6 +72,7 @@
 #include "microdesc_st.h"
 #include "networkstatus_st.h"
 #include "node_st.h"
+#include "routerinfo_st.h"
 #include "routerlist_st.h"
 #include "routerstatus_st.h"
 
diff --git a/src/or/or.h b/src/or/or.h
index 40d7dfee3..208ec6d33 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -1599,100 +1599,7 @@ typedef struct protover_summary_flags_t {
   unsigned int supports_v3_rendezvous_point: 1;
 } protover_summary_flags_t;
 
-/** Information about another onion router in the network. */
-typedef struct {
-  signed_descriptor_t cache_info;
-  char *nickname; /**< Human-readable OR name. */
-
-  uint32_t addr; /**< IPv4 address of OR, in host order. */
-  uint16_t or_port; /**< Port for TLS connections. */
-  uint16_t dir_port; /**< Port for HTTP directory connections. */
-
-  /** A router's IPv6 address, if it has one. */
-  /* XXXXX187 Actually these should probably be part of a list of addresses,
-   * not just a special case.  Use abstractions to access these; don't do it
-   * directly. */
-  tor_addr_t ipv6_addr;
-  uint16_t ipv6_orport;
-
-  crypto_pk_t *onion_pkey; /**< Public RSA key for onions. */
-  crypto_pk_t *identity_pkey;  /**< Public RSA key for signing. */
-  /** Public curve25519 key for onions */
-  curve25519_public_key_t *onion_curve25519_pkey;
-  /** What's the earliest expiration time on all the certs in this
-   * routerinfo? */
-  time_t cert_expiration_time;
-
-  char *platform; /**< What software/operating system is this OR using? */
-
-  char *protocol_list; /**< Encoded list of subprotocol versions supported
-                        * by this OR */
-
-  /* link info */
-  uint32_t bandwidthrate; /**< How many bytes does this OR add to its token
-                           * bucket per second? */
-  uint32_t bandwidthburst; /**< How large is this OR's token bucket? */
-  /** How many bytes/s is this router known to handle? */
-  uint32_t bandwidthcapacity;
-  smartlist_t *exit_policy; /**< What streams will this OR permit
-                             * to exit on IPv4?  NULL for 'reject *:*'. */
-  /** What streams will this OR permit to exit on IPv6?
-   * NULL for 'reject *:*' */
-  struct short_policy_t *ipv6_exit_policy;
-  long uptime; /**< How many seconds the router claims to have been up */
-  smartlist_t *declared_family; /**< Nicknames of router which this router
-                                 * claims are its family. */
-  char *contact_info; /**< Declared contact info for this router. */
-  unsigned int is_hibernating:1; /**< Whether the router claims to be
-                                  * hibernating */
-  unsigned int caches_extra_info:1; /**< Whether the router says it caches and
-                                     * serves extrainfo documents. */
-  unsigned int allow_single_hop_exits:1;  /**< Whether the router says
-                                           * it allows single hop exits. */
-
-  unsigned int wants_to_be_hs_dir:1; /**< True iff this router claims to be
-                                      * a hidden service directory. */
-  unsigned int policy_is_reject_star:1; /**< True iff the exit policy for this
-                                         * router rejects everything. */
-  /** True if, after we have added this router, we should re-launch
-   * tests for it. */
-  unsigned int needs_retest_if_added:1;
-
-  /** True iff this router included "tunnelled-dir-server" in its descriptor,
-   * implying it accepts tunnelled directory requests, or it advertised
-   * dir_port > 0. */
-  unsigned int supports_tunnelled_dir_requests:1;
-
-  /** Used during voting to indicate that we should not include an entry for
-   * this routerinfo. Used only during voting. */
-  unsigned int omit_from_vote:1;
-
-  /** Flags to summarize the protocol versions for this routerinfo_t. */
-  protover_summary_flags_t pv;
-
-/** Tor can use this router for general positions in circuits; we got it
- * from a directory server as usual, or we're an authority and a server
- * uploaded it. */
-#define ROUTER_PURPOSE_GENERAL 0
-/** Tor should avoid using this router for circuit-building: we got it
- * from a controller.  If the controller wants to use it, it'll have to
- * ask for it by identity. */
-#define ROUTER_PURPOSE_CONTROLLER 1
-/** Tor should use this router only for bridge positions in circuits: we got
- * it via a directory request from the bridge itself, or a bridge
- * authority. */
-#define ROUTER_PURPOSE_BRIDGE 2
-/** Tor should not use this router; it was marked in cached-descriptors with
- * a purpose we didn't recognize. */
-#define ROUTER_PURPOSE_UNKNOWN 255
-
-  /** In what way did we find out about this router?  One of ROUTER_PURPOSE_*.
-   * Routers of different purposes are kept segregated and used for different
-   * things; see notes on ROUTER_PURPOSE_* macros above.
-   */
-  uint8_t purpose;
-} routerinfo_t;
-
+typedef struct routerinfo_t routerinfo_t;
 typedef struct extrainfo_t extrainfo_t;
 typedef struct routerstatus_t routerstatus_t;
 
diff --git a/src/or/policies.c b/src/or/policies.c
index 07cf12387..bc4a9a920 100644
--- a/src/or/policies.c
+++ b/src/or/policies.c
@@ -34,6 +34,7 @@
 #include "microdesc_st.h"
 #include "node_st.h"
 #include "port_cfg_st.h"
+#include "routerinfo_st.h"
 #include "routerstatus_st.h"
 
 /** Policy that addresses for incoming SOCKS connections must match. */
diff --git a/src/or/relay.c b/src/or/relay.c
index 1eaf6f7db..ff97b5266 100644
--- a/src/or/relay.c
+++ b/src/or/relay.c
@@ -87,6 +87,7 @@
 #include "entry_connection_st.h"
 #include "or_circuit_st.h"
 #include "origin_circuit_st.h"
+#include "routerinfo_st.h"
 #include "socks_request_st.h"
 
 static edge_connection_t *relay_lookup_conn(circuit_t *circ, cell_t *cell,
diff --git a/src/or/router.c b/src/or/router.c
index 28dd360d3..ddbfb0313 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -47,6 +47,7 @@
 #include "node_st.h"
 #include "origin_circuit_st.h"
 #include "port_cfg_st.h"
+#include "routerinfo_st.h"
 
 /**
  * \file router.c
diff --git a/src/or/routerinfo_st.h b/src/or/routerinfo_st.h
new file mode 100644
index 000000000..800a8cbe3
--- /dev/null
+++ b/src/or/routerinfo_st.h
@@ -0,0 +1,105 @@
+/* Copyright (c) 2001 Matej Pfajfar.
+ * Copyright (c) 2001-2004, Roger Dingledine.
+ * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
+ * Copyright (c) 2007-2017, The Tor Project, Inc. */
+/* See LICENSE for licensing information */
+
+#ifndef ROUTERINFO_ST_H
+#define ROUTERINFO_ST_H
+
+/** Information about another onion router in the network. */
+struct routerinfo_t {
+  signed_descriptor_t cache_info;
+  char *nickname; /**< Human-readable OR name. */
+
+  uint32_t addr; /**< IPv4 address of OR, in host order. */
+  uint16_t or_port; /**< Port for TLS connections. */
+  uint16_t dir_port; /**< Port for HTTP directory connections. */
+
+  /** A router's IPv6 address, if it has one. */
+  /* XXXXX187 Actually these should probably be part of a list of addresses,
+   * not just a special case.  Use abstractions to access these; don't do it
+   * directly. */
+  tor_addr_t ipv6_addr;
+  uint16_t ipv6_orport;
+
+  crypto_pk_t *onion_pkey; /**< Public RSA key for onions. */
+  crypto_pk_t *identity_pkey;  /**< Public RSA key for signing. */
+  /** Public curve25519 key for onions */
+  curve25519_public_key_t *onion_curve25519_pkey;
+  /** What's the earliest expiration time on all the certs in this
+   * routerinfo? */
+  time_t cert_expiration_time;
+
+  char *platform; /**< What software/operating system is this OR using? */
+
+  char *protocol_list; /**< Encoded list of subprotocol versions supported
+                        * by this OR */
+
+  /* link info */
+  uint32_t bandwidthrate; /**< How many bytes does this OR add to its token
+                           * bucket per second? */
+  uint32_t bandwidthburst; /**< How large is this OR's token bucket? */
+  /** How many bytes/s is this router known to handle? */
+  uint32_t bandwidthcapacity;
+  smartlist_t *exit_policy; /**< What streams will this OR permit
+                             * to exit on IPv4?  NULL for 'reject *:*'. */
+  /** What streams will this OR permit to exit on IPv6?
+   * NULL for 'reject *:*' */
+  struct short_policy_t *ipv6_exit_policy;
+  long uptime; /**< How many seconds the router claims to have been up */
+  smartlist_t *declared_family; /**< Nicknames of router which this router
+                                 * claims are its family. */
+  char *contact_info; /**< Declared contact info for this router. */
+  unsigned int is_hibernating:1; /**< Whether the router claims to be
+                                  * hibernating */
+  unsigned int caches_extra_info:1; /**< Whether the router says it caches and
+                                     * serves extrainfo documents. */
+  unsigned int allow_single_hop_exits:1;  /**< Whether the router says
+                                           * it allows single hop exits. */
+
+  unsigned int wants_to_be_hs_dir:1; /**< True iff this router claims to be
+                                      * a hidden service directory. */
+  unsigned int policy_is_reject_star:1; /**< True iff the exit policy for this
+                                         * router rejects everything. */
+  /** True if, after we have added this router, we should re-launch
+   * tests for it. */
+  unsigned int needs_retest_if_added:1;
+
+  /** True iff this router included "tunnelled-dir-server" in its descriptor,
+   * implying it accepts tunnelled directory requests, or it advertised
+   * dir_port > 0. */
+  unsigned int supports_tunnelled_dir_requests:1;
+
+  /** Used during voting to indicate that we should not include an entry for
+   * this routerinfo. Used only during voting. */
+  unsigned int omit_from_vote:1;
+
+  /** Flags to summarize the protocol versions for this routerinfo_t. */
+  protover_summary_flags_t pv;
+
+/** Tor can use this router for general positions in circuits; we got it
+ * from a directory server as usual, or we're an authority and a server
+ * uploaded it. */
+#define ROUTER_PURPOSE_GENERAL 0
+/** Tor should avoid using this router for circuit-building: we got it
+ * from a controller.  If the controller wants to use it, it'll have to
+ * ask for it by identity. */
+#define ROUTER_PURPOSE_CONTROLLER 1
+/** Tor should use this router only for bridge positions in circuits: we got
+ * it via a directory request from the bridge itself, or a bridge
+ * authority. */
+#define ROUTER_PURPOSE_BRIDGE 2
+/** Tor should not use this router; it was marked in cached-descriptors with
+ * a purpose we didn't recognize. */
+#define ROUTER_PURPOSE_UNKNOWN 255
+
+  /** In what way did we find out about this router?  One of ROUTER_PURPOSE_*.
+   * Routers of different purposes are kept segregated and used for different
+   * things; see notes on ROUTER_PURPOSE_* macros above.
+   */
+  uint8_t purpose;
+};
+
+#endif
+
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 425ad8273..ad7e4102c 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -133,6 +133,7 @@
 #include "networkstatus_st.h"
 #include "networkstatus_voter_info_st.h"
 #include "node_st.h"
+#include "routerinfo_st.h"
 #include "routerlist_st.h"
 #include "vote_routerstatus_st.h"
 
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index dee4220b6..040745f65 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -91,6 +91,7 @@
 #include "rend_authorized_client_st.h"
 #include "rend_intro_point_st.h"
 #include "rend_service_descriptor_st.h"
+#include "routerinfo_st.h"
 #include "routerlist_st.h"
 #include "tor_version_st.h"
 #include "vote_microdesc_hash_st.h"
diff --git a/src/or/routerset.c b/src/or/routerset.c
index 1033702f3..415fa0ce7 100644
--- a/src/or/routerset.c
+++ b/src/or/routerset.c
@@ -37,6 +37,7 @@
 #include "routerset.h"
 
 #include "node_st.h"
+#include "routerinfo_st.h"
 #include "routerstatus_st.h"
 
 /** Return a new empty routerset. */
diff --git a/src/or/status.c b/src/or/status.c
index 4b8033d11..2cfc43679 100644
--- a/src/or/status.c
+++ b/src/or/status.c
@@ -30,6 +30,8 @@
 #include "hs_service.h"
 #include "dos.h"
 
+#include "routerinfo_st.h"
+
 static void log_accounting(const time_t now, const or_options_t *options);
 #include "geoip.h"
 
diff --git a/src/test/test_address_set.c b/src/test/test_address_set.c
index efc4d4e8a..93469573f 100644
--- a/src/test/test_address_set.c
+++ b/src/test/test_address_set.c
@@ -12,6 +12,7 @@
 
 #include "microdesc_st.h"
 #include "networkstatus_st.h"
+#include "routerinfo_st.h"
 #include "routerstatus_st.h"
 
 #include "test.h"
diff --git a/src/test/test_config.c b/src/test/test_config.c
index 2b761d2ba..ea0f45f22 100644
--- a/src/test/test_config.c
+++ b/src/test/test_config.c
@@ -46,6 +46,7 @@
 
 #include "dir_server_st.h"
 #include "port_cfg_st.h"
+#include "routerinfo_st.h"
 
 static void
 test_config_addressmap(void *arg)
diff --git a/src/test/test_connection.c b/src/test/test_connection.c
index 6f9c2706c..5d2aa65c8 100644
--- a/src/test/test_connection.c
+++ b/src/test/test_connection.c
@@ -28,6 +28,7 @@
 #include "entry_connection_st.h"
 #include "node_st.h"
 #include "or_connection_st.h"
+#include "routerinfo_st.h"
 #include "socks_request_st.h"
 
 static void * test_conn_get_basic_setup(const struct testcase_t *tc);
diff --git a/src/test/test_dir.c b/src/test/test_dir.c
index c25665d3e..ac5b3bd7c 100644
--- a/src/test/test_dir.c
+++ b/src/test/test_dir.c
@@ -52,6 +52,7 @@
 #include "networkstatus_voter_info_st.h"
 #include "ns_detached_signatures_st.h"
 #include "port_cfg_st.h"
+#include "routerinfo_st.h"
 #include "routerlist_st.h"
 #include "tor_version_st.h"
 #include "vote_microdesc_hash_st.h"
diff --git a/src/test/test_dir_common.c b/src/test/test_dir_common.c
index c23282ba8..3ec9fd691 100644
--- a/src/test/test_dir_common.c
+++ b/src/test/test_dir_common.c
@@ -17,6 +17,7 @@
 #include "authority_cert_st.h"
 #include "networkstatus_st.h"
 #include "networkstatus_voter_info_st.h"
+#include "routerinfo_st.h"
 #include "vote_microdesc_hash_st.h"
 #include "vote_routerstatus_st.h"
 
diff --git a/src/test/test_dir_handle_get.c b/src/test/test_dir_handle_get.c
index c8704505e..3babffb9e 100644
--- a/src/test/test_dir_handle_get.c
+++ b/src/test/test_dir_handle_get.c
@@ -38,6 +38,7 @@
 #include "dir_server_st.h"
 #include "networkstatus_st.h"
 #include "rend_encoded_v2_service_descriptor_st.h"
+#include "routerinfo_st.h"
 #include "routerlist_st.h"
 
 #ifdef _WIN32
diff --git a/src/test/test_entrynodes.c b/src/test/test_entrynodes.c
index 6a93921f9..bc075e91a 100644
--- a/src/test/test_entrynodes.c
+++ b/src/test/test_entrynodes.c
@@ -37,6 +37,7 @@
 #include "networkstatus_st.h"
 #include "node_st.h"
 #include "origin_circuit_st.h"
+#include "routerinfo_st.h"
 #include "routerstatus_st.h"
 
 #include "test_helpers.h"
diff --git a/src/test/test_hs.c b/src/test/test_hs.c
index c546af2fe..f2c520aee 100644
--- a/src/test/test_hs.c
+++ b/src/test/test_hs.c
@@ -25,6 +25,7 @@
 #include "node_st.h"
 #include "rend_encoded_v2_service_descriptor_st.h"
 #include "rend_intro_point_st.h"
+#include "routerinfo_st.h"
 
 #include "test_helpers.h"
 
diff --git a/src/test/test_hs_common.c b/src/test/test_hs_common.c
index 342626bcc..b4969fa7b 100644
--- a/src/test/test_hs_common.c
+++ b/src/test/test_hs_common.c
@@ -36,6 +36,7 @@
 #include "microdesc_st.h"
 #include "networkstatus_st.h"
 #include "node_st.h"
+#include "routerinfo_st.h"
 #include "routerstatus_st.h"
 
 /** Test the validation of HS v3 addresses */
diff --git a/src/test/test_hs_service.c b/src/test/test_hs_service.c
index ab27b4dc4..a4a1449b4 100644
--- a/src/test/test_hs_service.c
+++ b/src/test/test_hs_service.c
@@ -58,6 +58,7 @@
 #include "networkstatus_st.h"
 #include "node_st.h"
 #include "origin_circuit_st.h"
+#include "routerinfo_st.h"
 
 /* Trunnel */
 #include "hs/cell_establish_intro.h"
diff --git a/src/test/test_microdesc.c b/src/test/test_microdesc.c
index 593089335..28d349466 100644
--- a/src/test/test_microdesc.c
+++ b/src/test/test_microdesc.c
@@ -15,6 +15,7 @@
 
 #include "microdesc_st.h"
 #include "networkstatus_st.h"
+#include "routerinfo_st.h"
 #include "routerstatus_st.h"
 
 #include "test.h"
diff --git a/src/test/test_nodelist.c b/src/test/test_nodelist.c
index e41557ed3..df69466fb 100644
--- a/src/test/test_nodelist.c
+++ b/src/test/test_nodelist.c
@@ -15,6 +15,7 @@
 #include "microdesc_st.h"
 #include "networkstatus_st.h"
 #include "node_st.h"
+#include "routerinfo_st.h"
 #include "routerstatus_st.h"
 
 #include "test.h"
diff --git a/src/test/test_policy.c b/src/test/test_policy.c
index 71c623070..61ebd27dc 100644
--- a/src/test/test_policy.c
+++ b/src/test/test_policy.c
@@ -12,6 +12,7 @@
 
 #include "node_st.h"
 #include "port_cfg_st.h"
+#include "routerinfo_st.h"
 #include "routerstatus_st.h"
 
 /* Helper: assert that short_policy parses and writes back out as itself,
diff --git a/src/test/test_rendcache.c b/src/test/test_rendcache.c
index e5d531617..22af3473b 100644
--- a/src/test/test_rendcache.c
+++ b/src/test/test_rendcache.c
@@ -15,6 +15,7 @@
 #include "rend_encoded_v2_service_descriptor_st.h"
 #include "rend_intro_point_st.h"
 #include "rend_service_descriptor_st.h"
+#include "routerinfo_st.h"
 
 #include "rend_test_helpers.h"
 #include "log_test_helpers.h"
diff --git a/src/test/test_router.c b/src/test/test_router.c
index 4e96e2453..d560a1aec 100644
--- a/src/test/test_router.c
+++ b/src/test/test_router.c
@@ -14,6 +14,8 @@
 #include "router.h"
 #include "routerlist.h"
 
+#include "routerinfo_st.h"
+
 /* Test suite stuff */
 #include "test.h"
 
diff --git a/src/test/test_routerset.c b/src/test/test_routerset.c
index 21db9bb3b..004b88ac8 100644
--- a/src/test/test_routerset.c
+++ b/src/test/test_routerset.c
@@ -11,6 +11,7 @@
 #include "nodelist.h"
 
 #include "node_st.h"
+#include "routerinfo_st.h"
 #include "routerstatus_st.h"
 
 #include "test.h"
diff --git a/src/test/test_status.c b/src/test/test_status.c
index 062a28f73..cedce1676 100644
--- a/src/test/test_status.c
+++ b/src/test/test_status.c
@@ -26,6 +26,7 @@
 #include "statefile.h"
 
 #include "origin_circuit_st.h"
+#include "routerinfo_st.h"
 
 #include "test.h"
 





More information about the tor-commits mailing list