Skip to contentSkip to conversation

migration: Fix latent bug in migrate_params_test_apply()

PATCH In review Markus Armbruster 2 participants 2 messages Apr 7, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 migration: Fix latent bug in migrate_params_test_apply()

migrate_params_test_apply() neglects to apply tls_authz. Currently harmless, because migrate_params_check() doesn't care. Fix it anyway.

---
 migration/options.c | 5 +++++
 1 file changed, 5 insertions(+)
migration/options.c +5 -0
index b0ac2ea408..cb8eec218f 100644
@@ -1193,6 +1193,11 @@ static void migrate_params_test_apply(MigrateSetParameters *params,
         dest->tls_hostname = params->tls_hostname->u.s;
     }
 
+    if (params->tls_authz) {
+        assert(params->tls_authz->type == QTYPE_QSTRING);
+        dest->tls_authz = params->tls_authz->u.s;
+    }
+
     if (params->has_max_bandwidth) {
         dest->max_bandwidth = params->max_bandwidth;
     }
Signature · 1 line
2.48.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 14 lines · Markus Armbruster

migrate_params_test_apply() neglects to apply tls_authz. Currently harmless, because migrate_params_check() doesn't care. Fix it anyway.

---
 migration/options.c | 5 +++++
 1 file changed, 5 insertions(+)
migration/options.c +0 -0
index b0ac2ea408..cb8eec218f 100644
@@ -1193,6 +1193,11 @@ static void migrate_params_test_apply(MigrateSetParameters *params,
         dest->tls_hostname = params->tls_hostname->u.s;

migration/options.c static void migrate_params_test_apply(MigrateSetParameters *params, · line 1203

Quoted 10 lines
migration/options.c +5 -0
     }
 
+    if (params->tls_authz) {
+        assert(params->tls_authz->type == QTYPE_QSTRING);
+        dest->tls_authz = params->tls_authz->u.s;
+    }
+
     if (params->has_max_bandwidth) {
         dest->max_bandwidth = params->max_bandwidth;
     }