diff options
author | Thomas Haller <thaller@redhat.com> | 2018-03-22 17:04:41 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2018-03-26 16:56:05 +0200 |
commit | dee6dd6e4e2802582e76fb6e8e40a7a86fb7d421 (patch) | |
tree | 0757ee5bbe0e04c306ca8667f285d81c1632d635 | |
parent | 9ff6134814de1110ee511b707f66d6529671e6e5 (diff) | |
download | NetworkManager-dee6dd6e4e2802582e76fb6e8e40a7a86fb7d421.tar.gz |
platform: reorder failure checks in nm_platform_ip_route_sync()
Move handling non-NM_IP_CONFIG_SOURCE_USER routes first. These are
routes that were added manually by the user in the connection.
Note that there is no change in behavior, because of how
_err_inval_due_to_ipv6_tentative_pref_src() would only accept
user routes already.
-rw-r--r-- | src/platform/nm-platform.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/platform/nm-platform.c b/src/platform/nm-platform.c index c909a6fdb6..dac0a5ff94 100644 --- a/src/platform/nm-platform.c +++ b/src/platform/nm-platform.c @@ -3972,6 +3972,11 @@ nm_platform_ip_route_sync (NMPlatform *self, nmp_object_to_string (plat_entry->obj, NMP_OBJECT_TO_STRING_PUBLIC, sbuf2, sizeof (sbuf2))); } } + } else if (NMP_OBJECT_CAST_IP_ROUTE (conf_o)->rt_source < NM_IP_CONFIG_SOURCE_USER) { + _LOGD ("route-sync: ignore failure to add IPv%c route: %s: %s", + vt->is_ip4 ? '4' : '6', + nmp_object_to_string (conf_o, NMP_OBJECT_TO_STRING_PUBLIC, sbuf1, sizeof (sbuf1)), + nm_platform_error_to_string (plerr, sbuf_err, sizeof (sbuf_err))); } else if ( -((int) plerr) == EINVAL && out_temporary_not_available && _err_inval_due_to_ipv6_tentative_pref_src (self, conf_o)) { @@ -3981,11 +3986,6 @@ nm_platform_ip_route_sync (NMPlatform *self, if (!*out_temporary_not_available) *out_temporary_not_available = g_ptr_array_new_full (0, (GDestroyNotify) nmp_object_unref); g_ptr_array_add (*out_temporary_not_available, (gpointer) nmp_object_ref (conf_o)); - } else if (NMP_OBJECT_CAST_IP_ROUTE (conf_o)->rt_source < NM_IP_CONFIG_SOURCE_USER) { - _LOGD ("route-sync: ignore failure to add IPv%c route: %s: %s", - vt->is_ip4 ? '4' : '6', - nmp_object_to_string (conf_o, NMP_OBJECT_TO_STRING_PUBLIC, sbuf1, sizeof (sbuf1)), - nm_platform_error_to_string (plerr, sbuf_err, sizeof (sbuf_err))); } else { const char *reason = ""; |