diff options
author | mkaruza <mario.karuza@galeracluster.com> | 2021-11-22 13:04:40 +0100 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2022-08-02 17:24:28 +0300 |
commit | 9743d0043e8fc248043e2d98e7fa4197557ac59d (patch) | |
tree | 538ced1c84e51f7511649701a9ced11a0792891a /sql/wsrep_server_state.cc | |
parent | b3372d642265237aaa25e45c73d337068c1d5d1a (diff) | |
download | mariadb-git-9743d0043e8fc248043e2d98e7fa4197557ac59d.tar.gz |
MDEV-27246 Implement a method to add IPs to allowlist for Galera Cluster node addresses that can make SST/IST requests
Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
Diffstat (limited to 'sql/wsrep_server_state.cc')
-rw-r--r-- | sql/wsrep_server_state.cc | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/sql/wsrep_server_state.cc b/sql/wsrep_server_state.cc index 973850871b1..8e5f20c8b96 100644 --- a/sql/wsrep_server_state.cc +++ b/sql/wsrep_server_state.cc @@ -16,6 +16,7 @@ #include "my_global.h" #include "wsrep_api.h" #include "wsrep_server_state.h" +#include "wsrep_allowlist_service.h" #include "wsrep_binlog.h" /* init/deinit group commit */ mysql_mutex_t LOCK_wsrep_server_state; @@ -26,6 +27,8 @@ PSI_mutex_key key_LOCK_wsrep_server_state; PSI_cond_key key_COND_wsrep_server_state; #endif +wsrep::provider::services Wsrep_server_state::m_provider_services; + Wsrep_server_state::Wsrep_server_state(const std::string& name, const std::string& incoming_address, const std::string& address, @@ -74,7 +77,6 @@ void Wsrep_server_state::init_once(const std::string& name, void Wsrep_server_state::destroy() { - if (m_instance) { delete m_instance; @@ -83,3 +85,16 @@ void Wsrep_server_state::destroy() mysql_cond_destroy(&COND_wsrep_server_state); } } + +void Wsrep_server_state::init_provider_services() +{ + m_provider_services.allowlist_service= wsrep_allowlist_service_init(); +} + +void Wsrep_server_state::deinit_provider_services() +{ + if (m_provider_services.allowlist_service) + wsrep_allowlist_service_deinit(); + m_provider_services= wsrep::provider::services(); +} + |