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().
This commit is contained in:
Thomas Haller
2023-02-22 13:05:53 +01:00
parent d755b50808
commit eca8ebef18

View File

@@ -4928,8 +4928,10 @@ nm_platform_ip_route_sync(NMPlatform *self,
for (i_type = 0; routes && i_type < 2; i_type++) { for (i_type = 0; routes && i_type < 2; i_type++) {
for (i = 0; i < routes->len; i++) { for (i = 0; i < routes->len; i++) {
int r, r2; gs_free char *extack_msg = NULL;
gboolean gateway_route_added = FALSE; gboolean gateway_route_added = FALSE;
int r2;
int r;
conf_o = routes->pdata[i]; conf_o = routes->pdata[i];
@@ -4990,7 +4992,7 @@ sync_route_add:
NMP_NLM_FLAG_APPEND NMP_NLM_FLAG_APPEND
| NMP_NLM_FLAG_SUPPRESS_NETLINK_FAILURE, | NMP_NLM_FLAG_SUPPRESS_NETLINK_FAILURE,
conf_o, conf_o,
NULL); &extack_msg);
if (r < 0) { if (r < 0) {
if (r == -EEXIST) { if (r == -EEXIST) {
/* Don't fail for EEXIST. It's not clear that the existing route /* Don't fail for EEXIST. It's not clear that the existing route