mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Merge remote-tracking branch 'tor-github/pr/1535'
This commit is contained in:
commit
825f52784d
3
changes/ticket32244
Normal file
3
changes/ticket32244
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
o Code simplification and refactoring:
|
||||||
|
- Disable relay_periodic when the relay module is disabled.
|
||||||
|
Closes ticket 32244.
|
3
changes/ticket32245
Normal file
3
changes/ticket32245
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
o Code simplification and refactoring:
|
||||||
|
- Disable relay_sys when the relay module is disabled.
|
||||||
|
Closes ticket 32245.
|
@ -385,7 +385,7 @@ subsystems_get_state_idx(const subsys_fns_t *sys)
|
|||||||
tor_assert(i >= 0);
|
tor_assert(i >= 0);
|
||||||
return sys_status[i].state_idx;
|
return sys_status[i].state_idx;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* defined(TOR_UNIT_TESTS) */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Call all appropriate set_options() methods to tell the various subsystems
|
* Call all appropriate set_options() methods to tell the various subsystems
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
#include "core/or/or_sys.h"
|
#include "core/or/or_sys.h"
|
||||||
#include "core/or/orconn_event_sys.h"
|
#include "core/or/orconn_event_sys.h"
|
||||||
#include "feature/control/btrack_sys.h"
|
#include "feature/control/btrack_sys.h"
|
||||||
#include "feature/relay/relay_sys.h"
|
|
||||||
#include "lib/compress/compress_sys.h"
|
#include "lib/compress/compress_sys.h"
|
||||||
#include "lib/crypt_ops/crypto_sys.h"
|
#include "lib/crypt_ops/crypto_sys.h"
|
||||||
#include "lib/err/torerr_sys.h"
|
#include "lib/err/torerr_sys.h"
|
||||||
@ -33,6 +32,7 @@
|
|||||||
#include "lib/evloop/evloop_sys.h"
|
#include "lib/evloop/evloop_sys.h"
|
||||||
|
|
||||||
#include "feature/dirauth/dirauth_sys.h"
|
#include "feature/dirauth/dirauth_sys.h"
|
||||||
|
#include "feature/relay/relay_sys.h"
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
@ -66,7 +66,9 @@ const subsys_fns_t *tor_subsystems[] = {
|
|||||||
&sys_mainloop,
|
&sys_mainloop,
|
||||||
&sys_or,
|
&sys_or,
|
||||||
|
|
||||||
|
#ifdef HAVE_MODULE_RELAY
|
||||||
&sys_relay,
|
&sys_relay,
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_MODULE_DIRAUTH
|
#ifdef HAVE_MODULE_DIRAUTH
|
||||||
&sys_dirauth,
|
&sys_dirauth,
|
||||||
|
@ -143,8 +143,6 @@ LIBTOR_APP_A_SOURCES = \
|
|||||||
src/feature/relay/dns.c \
|
src/feature/relay/dns.c \
|
||||||
src/feature/relay/ext_orport.c \
|
src/feature/relay/ext_orport.c \
|
||||||
src/feature/relay/onion_queue.c \
|
src/feature/relay/onion_queue.c \
|
||||||
src/feature/relay/relay_periodic.c \
|
|
||||||
src/feature/relay/relay_sys.c \
|
|
||||||
src/feature/relay/router.c \
|
src/feature/relay/router.c \
|
||||||
src/feature/relay/routerkeys.c \
|
src/feature/relay/routerkeys.c \
|
||||||
src/feature/relay/selftest.c \
|
src/feature/relay/selftest.c \
|
||||||
@ -174,6 +172,8 @@ LIBTOR_APP_TESTING_A_SOURCES = $(LIBTOR_APP_A_SOURCES)
|
|||||||
MODULE_RELAY_SOURCES = \
|
MODULE_RELAY_SOURCES = \
|
||||||
src/feature/relay/routermode.c \
|
src/feature/relay/routermode.c \
|
||||||
src/feature/relay/relay_config.c \
|
src/feature/relay/relay_config.c \
|
||||||
|
src/feature/relay/relay_periodic.c \
|
||||||
|
src/feature/relay/relay_sys.c \
|
||||||
src/feature/relay/transport_config.c
|
src/feature/relay/transport_config.c
|
||||||
|
|
||||||
# The Directory Authority module.
|
# The Directory Authority module.
|
||||||
|
@ -12,6 +12,10 @@
|
|||||||
#ifndef DIRAUTH_SYS_H
|
#ifndef DIRAUTH_SYS_H
|
||||||
#define DIRAUTH_SYS_H
|
#define DIRAUTH_SYS_H
|
||||||
|
|
||||||
|
#ifdef HAVE_MODULE_DIRAUTH
|
||||||
|
|
||||||
extern const struct subsys_fns_t sys_dirauth;
|
extern const struct subsys_fns_t sys_dirauth;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* !defined(DIRAUTH_SYS_H) */
|
#endif /* !defined(DIRAUTH_SYS_H) */
|
||||||
|
@ -12,7 +12,20 @@
|
|||||||
#ifndef TOR_FEATURE_RELAY_RELAY_PERIODIC_H
|
#ifndef TOR_FEATURE_RELAY_RELAY_PERIODIC_H
|
||||||
#define TOR_FEATURE_RELAY_RELAY_PERIODIC_H
|
#define TOR_FEATURE_RELAY_RELAY_PERIODIC_H
|
||||||
|
|
||||||
|
#ifdef HAVE_MODULE_RELAY
|
||||||
|
|
||||||
void relay_register_periodic_events(void);
|
void relay_register_periodic_events(void);
|
||||||
void reschedule_descriptor_update_check(void);
|
void reschedule_descriptor_update_check(void);
|
||||||
|
|
||||||
|
#else /* !defined(HAVE_MODULE_RELAY) */
|
||||||
|
|
||||||
|
#include "lib/cc/compat_compiler.h"
|
||||||
|
|
||||||
|
#define relay_register_periodic_events() \
|
||||||
|
STMT_NIL
|
||||||
|
#define reschedule_descriptor_update_check() \
|
||||||
|
STMT_NIL
|
||||||
|
|
||||||
|
#endif /* defined(HAVE_MODULE_RELAY) */
|
||||||
|
|
||||||
#endif /* !defined(TOR_FEATURE_RELAY_RELAY_PERIODIC_H) */
|
#endif /* !defined(TOR_FEATURE_RELAY_RELAY_PERIODIC_H) */
|
||||||
|
@ -12,6 +12,10 @@
|
|||||||
#ifndef TOR_FEATURE_RELAY_RELAY_SYS_H
|
#ifndef TOR_FEATURE_RELAY_RELAY_SYS_H
|
||||||
#define TOR_FEATURE_RELAY_RELAY_SYS_H
|
#define TOR_FEATURE_RELAY_RELAY_SYS_H
|
||||||
|
|
||||||
|
#ifdef HAVE_MODULE_RELAY
|
||||||
|
|
||||||
extern const struct subsys_fns_t sys_relay;
|
extern const struct subsys_fns_t sys_relay;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* !defined(TOR_FEATURE_RELAY_RELAY_SYS_H) */
|
#endif /* !defined(TOR_FEATURE_RELAY_RELAY_SYS_H) */
|
||||||
|
@ -134,7 +134,7 @@
|
|||||||
.initvalue = initval \
|
.initvalue = initval \
|
||||||
},
|
},
|
||||||
/**@}*/
|
/**@}*/
|
||||||
#endif
|
#endif /* !defined(COCCI) */
|
||||||
|
|
||||||
/** Type aliases for the "commonly used" configuration types.
|
/** Type aliases for the "commonly used" configuration types.
|
||||||
*
|
*
|
||||||
|
@ -296,7 +296,7 @@ crypto_openssl_init_engines(const char *accelName,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
#else
|
#else /* !defined(DISABLE_ENGINES) */
|
||||||
ENGINE *e = NULL;
|
ENGINE *e = NULL;
|
||||||
|
|
||||||
log_info(LD_CRYPTO, "Initializing OpenSSL engine support.");
|
log_info(LD_CRYPTO, "Initializing OpenSSL engine support.");
|
||||||
|
Loading…
Reference in New Issue
Block a user