From eca8ebef185a539fc60b4ed09fd98558e50369a6 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 22 Feb 2023 13:05:53 +0100 Subject: [PATCH] platform: get extack_msg innm_platform_ip_route_sync() Request the extack_msg for nm_platform_ip_route_add() call. Note that we (currently) don't do anything with it, however requesting it has no downsides. That is, the message already is heap allocated in the lower layers, so this only affects whether it will be returned up to nm_platform_ip_route_sync(). --- src/libnm-platform/nm-platform.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/libnm-platform/nm-platform.c b/src/libnm-platform/nm-platform.c index c4cd61cf4..c9b7919a4 100644 --- a/src/libnm-platform/nm-platform.c +++ b/src/libnm-platform/nm-platform.c @@ -4928,8 +4928,10 @@ nm_platform_ip_route_sync(NMPlatform *self, for (i_type = 0; routes && i_type < 2; i_type++) { for (i = 0; i < routes->len; i++) { - int r, r2; - gboolean gateway_route_added = FALSE; + gs_free char *extack_msg = NULL; + gboolean gateway_route_added = FALSE; + int r2; + int r; conf_o = routes->pdata[i]; @@ -4990,7 +4992,7 @@ sync_route_add: NMP_NLM_FLAG_APPEND | NMP_NLM_FLAG_SUPPRESS_NETLINK_FAILURE, conf_o, - NULL); + &extack_msg); if (r < 0) { if (r == -EEXIST) { /* Don't fail for EEXIST. It's not clear that the existing route