]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix compilation with --disable-module-relay
authorNick Mathewson <nickm@torproject.org>
Fri, 14 Feb 2025 00:44:33 +0000 (19:44 -0500)
committerNick Mathewson <nickm@torproject.org>
Thu, 6 Mar 2025 14:41:54 +0000 (09:41 -0500)
src/app/main/main.c
src/feature/relay/router.c
src/feature/relay/routerkeys.h

index 285113c4f2765361e2198e0f3036fb40ad627ac9..3dc34abce7ace109cc709b56c06334ef4f18935e 100644 (file)
@@ -187,8 +187,8 @@ do_hup(void)
         generate_ed_link_cert(options, now, new_signing_key > 0)) {
       log_warn(LD_OR, "Problem reloading Ed25519 keys; still using old keys.");
     }
-    const networkstatus_t *ns = networkstatus_get_latest_consensus();
-    if (load_family_id_keys(options, ns)) {
+    if (load_family_id_keys(options,
+                            networkstatus_get_latest_consensus())) {
       log_warn(LD_OR, "Problem reloading family ID keys; "
                "still using old keys.");
     }
index d6898ba3cf8442d77f285e1d17bea5ef489e0d9b..d9adc638c49fa59c7bcf7b7bfe284ad3635c8db1 100644 (file)
@@ -876,6 +876,7 @@ router_initialize_tls_context(void)
 STATIC void
 router_announce_bridge_status_page(void)
 {
+#ifdef ENABLE_MODULE_RELAY
   char fingerprint[FINGERPRINT_LEN + 1];
 
   if (crypto_pk_get_hashed_fingerprint(get_server_identity_key(),
@@ -889,6 +890,7 @@ router_announce_bridge_status_page(void)
   log_notice(LD_GENERAL, "You can check the status of your bridge relay at "
                          "https://bridges.torproject.org/status?id=%s",
                          fingerprint);
+#endif
 }
 
 /** Compute fingerprint (or hashed fingerprint if hashed is 1) and write
index f00c6836add2828e84578f611a9e166a3c89b830..70fc2ec225cf28f4ed46124456d43a3b7d43bd01 100644 (file)
@@ -89,6 +89,10 @@ relay_key_is_unavailable_(void)
   ((void)(options), (void)(now), (void)(force), 0)
 #define should_make_new_ed_keys(options, now) \
   ((void)(options), (void)(now), 0)
+#define warn_about_family_id_config(options,ns) \
+  ((void)(options), (void)(ns))
+#define get_current_family_id_keys() \
+  (smartlist_new())
 
 // These can get removed once router.c becomes relay-only.
 static inline struct tor_cert_st *
@@ -129,6 +133,8 @@ make_tap_onion_key_crosscert(const crypto_pk_t *onion_key,
   (puts("Not available: Tor has been compiled without relay support"), 0)
 #define load_family_id_keys(x,y)                                         \
   (puts("Not available: Tor has been compiled without relay support"), 0)
+#define create_family_id_key(x)                                         \
+  (puts("Not available: Tor has been compiled without relay support"), -1)
 
 #endif /* defined(HAVE_MODULE_RELAY) */