summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2021-01-05 17:59:32 +0100
committerThomas Haller <thaller@redhat.com>2021-01-08 16:32:49 +0100
commite81b442d8b26a51865f5b8f4b7d3a8cf3eb37bbe (patch)
tree8a39ef192c882fd8035b2d9e2f9051ecf3eb55e4
parentfc8315cd9416cab19577e81c0af2d999b0c9b227 (diff)
downloadNetworkManager-e81b442d8b26a51865f5b8f4b7d3a8cf3eb37bbe.tar.gz
cloud-setup: fail get_config() for Azure on invalid prefix
While it's not clear whether we should be strict or forgiving when fetching the HTTP meta data, we should be consistent. On a parse error of the IP addresses we fail. Hence also fail on a parse error for the subnet.
-rw-r--r--clients/cloud-setup/nmcs-provider-azure.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/clients/cloud-setup/nmcs-provider-azure.c b/clients/cloud-setup/nmcs-provider-azure.c
index da7cf54084..5d31fd03a1 100644
--- a/clients/cloud-setup/nmcs-provider-azure.c
+++ b/clients/cloud-setup/nmcs-provider-azure.c
@@ -163,6 +163,8 @@ _get_config_fetch_done_cb(NMHttpClient * http_client,
if (tmp_prefix == -1) {
_LOGD("interface[%" G_GSSIZE_FORMAT "]: invalid prefix", iface_data->iface_idx);
+ error =
+ nm_utils_error_new(NM_UTILS_ERROR_UNKNOWN, "subnet does not give a valid prefix");
goto out_done;
}