diff options
author | Thomas Haller <thaller@redhat.com> | 2021-01-05 17:59:32 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2021-01-08 16:32:49 +0100 |
commit | e81b442d8b26a51865f5b8f4b7d3a8cf3eb37bbe (patch) | |
tree | 8a39ef192c882fd8035b2d9e2f9051ecf3eb55e4 /clients | |
parent | fc8315cd9416cab19577e81c0af2d999b0c9b227 (diff) | |
download | NetworkManager-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.
Diffstat (limited to 'clients')
-rw-r--r-- | clients/cloud-setup/nmcs-provider-azure.c | 2 |
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; } |