summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2023-02-22 13:05:53 +0100
committerThomas Haller <thaller@redhat.com>2023-02-28 12:12:08 +0100
commiteca8ebef185a539fc60b4ed09fd98558e50369a6 (patch)
tree029a471a09f12779f7e75f7f09198c72af016412
parentd755b50808eccbb4ae5e29895c23b4e41837dca1 (diff)
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().
-rw-r--r--src/libnm-platform/nm-platform.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libnm-platform/nm-platform.c b/src/libnm-platform/nm-platform.c
index c4cd61cf47..c9b7919a4c 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