diff options
author | Thomas Haller <thaller@redhat.com> | 2023-05-16 13:28:02 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2023-06-08 10:46:18 +0200 |
commit | beb83e8e38a93591ea95f441499af1f82e5f7d3e (patch) | |
tree | e97fa61b1222053ab499dec84a309b72c9103c15 | |
parent | b96980b129988c0bc0634c5eed1f25c8915a76c2 (diff) |
cloud-setup: fix _aliyun_base() initializing base URL
Fixes: f3404435a9fb ('cloud-setup: configure secondary ip in Aliyun cloud')
(cherry picked from commit 62104477c3131aa7704ad53b671f23a8ef5c4bdc)
(cherry picked from commit c6977592c3b39b34844671673c976b8528270caf)
-rw-r--r-- | src/nm-cloud-setup/nmcs-provider-aliyun.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nm-cloud-setup/nmcs-provider-aliyun.c b/src/nm-cloud-setup/nmcs-provider-aliyun.c index 0500922058..36358f98d9 100644 --- a/src/nm-cloud-setup/nmcs-provider-aliyun.c +++ b/src/nm-cloud-setup/nmcs-provider-aliyun.c @@ -31,11 +31,12 @@ again: * This is mainly for testing, it's not usually supposed to be configured. * Consider this private API! */ base = g_getenv(NMCS_ENV_VARIABLE("NM_CLOUD_SETUP_ALIYUN_HOST")); + base = nmcs_utils_uri_complete_interned(base) ?: ("" NM_ALIYUN_HOST); if (!g_atomic_pointer_compare_and_exchange(&base_cached, NULL, base)) goto again; } - base = nmcs_utils_uri_complete_interned(base) ?: ("" NM_ALIYUN_BASE); + return base; } |