aboutsummaryrefslogtreecommitdiff
path: root/migration
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2023-03-02 12:33:50 +0100
committerJuan Quintela <quintela@redhat.com>2023-04-27 16:37:28 +0200
commit2eb0308bbd5e20bb20229c790dc2c7f1ae8e3ba9 (patch)
tree8a6b57654c91d3754901ff054580a3c336524f2d /migration
parentd5c3e1959cbabe9456bf1d5860ad718c6cd27fb8 (diff)
migration: Create migrate_tls_authz() function
Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> --- Moved the type to const char * (vladimir)
Diffstat (limited to 'migration')
-rw-r--r--migration/options.c7
-rw-r--r--migration/options.h1
-rw-r--r--migration/tls.c5
3 files changed, 9 insertions, 4 deletions
diff --git a/migration/options.c b/migration/options.c
index b5d4ebef8d..014aecc9ee 100644
--- a/migration/options.c
+++ b/migration/options.c
@@ -582,6 +582,13 @@ uint8_t migrate_throttle_trigger_threshold(void)
return s->parameters.throttle_trigger_threshold;
}
+const char *migrate_tls_authz(void)
+{
+ MigrationState *s = migrate_get_current();
+
+ return s->parameters.tls_authz;
+}
+
const char *migrate_tls_creds(void)
{
MigrationState *s = migrate_get_current();
diff --git a/migration/options.h b/migration/options.h
index 4603ac9201..987e639a49 100644
--- a/migration/options.h
+++ b/migration/options.h
@@ -80,6 +80,7 @@ MultiFDCompression migrate_multifd_compression(void);
int migrate_multifd_zlib_level(void);
int migrate_multifd_zstd_level(void);
uint8_t migrate_throttle_trigger_threshold(void);
+const char *migrate_tls_authz(void);
const char *migrate_tls_creds(void);
uint64_t migrate_xbzrle_cache_size(void);
diff --git a/migration/tls.c b/migration/tls.c
index 6e70887699..184db4d7bf 100644
--- a/migration/tls.c
+++ b/migration/tls.c
@@ -86,10 +86,7 @@ void migration_tls_channel_process_incoming(MigrationState *s,
return;
}
- tioc = qio_channel_tls_new_server(
- ioc, creds,
- s->parameters.tls_authz,
- errp);
+ tioc = qio_channel_tls_new_server(ioc, creds, migrate_tls_authz(), errp);
if (!tioc) {
return;
}