about summary refs log tree commit diff
path: root/src/nm-cloud-setup/nmcs-provider.h
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2023-08-09 21:56:59 +0200
committerMichael Biebl <biebl@debian.org>2023-08-09 21:56:59 +0200
commitb1206f287e4fae1f9a7e29ec0dc11b54d726a7f8 (patch)
treecc1d62cd21f10b2375c76484b5e2187f1e75f010 /src/nm-cloud-setup/nmcs-provider.h
parenta6d4d07b23485507f30ddb1ce99f5c82428714c8 (diff)
parent05e4a733f2141995181a551854d5df929f084adf (diff)
Update upstream source from tag 'upstream/1.44.0'
Update to upstream version '1.44.0'
with Debian dir e69e19b54914190e7696747b3e0508f95977f387
Diffstat (limited to 'src/nm-cloud-setup/nmcs-provider.h')
-rw-r--r--src/nm-cloud-setup/nmcs-provider.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nm-cloud-setup/nmcs-provider.h b/src/nm-cloud-setup/nmcs-provider.h
index 09cdb414..9e5eeebe 100644
--- a/src/nm-cloud-setup/nmcs-provider.h
+++ b/src/nm-cloud-setup/nmcs-provider.h
@@ -34,8 +34,8 @@ typedef struct {
     bool      has_cidr : 1;
     bool      has_gateway : 1;
 
-    NMIPRoute **iproutes_arr;
-    gsize       iproutes_len;
+    /* Array of NMIPRoute (must own/free the entries). */
+    GPtrArray *iproutes;
 
     /* TRUE, if the configuration was requested via hwaddrs argument to
      * nmcs_provider_get_config(). */
@@ -59,7 +59,8 @@ static inline gboolean
 nmcs_provider_get_config_iface_data_is_valid(const NMCSProviderGetConfigIfaceData *config_data)
 {
     return config_data && config_data->iface_idx >= 0
-           && ((config_data->has_ipv4s && config_data->has_cidr) || config_data->iproutes_len);
+           && ((config_data->has_ipv4s && config_data->has_cidr)
+               || nm_g_ptr_array_len(config_data->iproutes) > 0);
 }
 
 /*****************************************************************************/