aboutsummaryrefslogtreecommitdiff
path: root/src/feature/relay/transport_config.h
diff options
context:
space:
mode:
authorteor <teor@torproject.org>2019-10-31 00:28:05 +1000
committerteor <teor@torproject.org>2019-11-04 13:10:00 +1000
commitd3c8486724ad29c732bbae591f11b0597641a446 (patch)
tree542f5791879a7942bd0092d725dab1dc5a8705f8 /src/feature/relay/transport_config.h
parent85e50954d85e0372d2f4e854e651817389b4ece9 (diff)
downloadtor-d3c8486724ad29c732bbae591f11b0597641a446.tar.gz
tor-d3c8486724ad29c732bbae591f11b0597641a446.zip
relay: Disable relay config when the module is disabled
This commit: * disables the ORPort, DirPort, DirCache, and BridgeRelay options, * sets ClientOnly 1, * disables relay_config.c and relay/transport_config.c, * disables test_rebind.sh, and * modifies the expected results for test_parseconf.sh, when the relay module is disabled. Part of 32213.
Diffstat (limited to 'src/feature/relay/transport_config.h')
-rw-r--r--src/feature/relay/transport_config.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/feature/relay/transport_config.h b/src/feature/relay/transport_config.h
index fe3747f665..c23eee03c3 100644
--- a/src/feature/relay/transport_config.h
+++ b/src/feature/relay/transport_config.h
@@ -12,6 +12,8 @@
#ifndef TOR_FEATURE_RELAY_TRANSPORT_CONFIG_H
#define TOR_FEATURE_RELAY_TRANSPORT_CONFIG_H
+#ifdef HAVE_MODULE_RELAY
+
#include "lib/testsupport/testsupport.h"
typedef struct or_options_t or_options_t;
@@ -34,4 +36,20 @@ STATIC smartlist_t *get_options_from_transport_options_line(
#endif
+#else
+
+#define get_transport_bindaddr_from_config(transport) \
+ (((void)(transport)),NULL)
+
+/* 31851: called from client/transports.c, but only from server code */
+#define get_options_for_server_transport(transport) \
+ (((void)(transport)),NULL)
+
+#define options_validate_server_transport(old_options, options, msg) \
+ (((void)(old_options)),((void)(options)),((void)(msg)),0)
+#define options_act_server_transport(old_options) \
+ (((void)(old_options)),0)
+
+#endif
+
#endif /* !defined(TOR_FEATURE_RELAY_TRANSPORT_CONFIG_H) */