mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-26 03:00:13 +01:00
platform: limit retry count on link change
This is a nice safeguard, also consistent with ip_route_get().
This commit is contained in:
parent
fee7832bde
commit
090ff4ae95
1 changed files with 2 additions and 1 deletions
|
|
@ -8251,6 +8251,7 @@ do_change_link(NMPlatform *platform,
|
|||
const char *log_detail;
|
||||
gs_free char *log_detail_free = NULL;
|
||||
const NMPObject *obj_cache;
|
||||
int try_count = 0;
|
||||
|
||||
if (!nm_platform_netns_push(platform, &netns)) {
|
||||
log_level = LOGL_ERR;
|
||||
|
|
@ -8329,7 +8330,7 @@ out:
|
|||
wait_for_nl_response_to_string(seq_result, extack_msg, s_buf, sizeof(s_buf)),
|
||||
log_detail);
|
||||
|
||||
if (result == -EAGAIN)
|
||||
if (result == -EAGAIN && ++try_count < RESYNC_RETRIES)
|
||||
goto retry;
|
||||
|
||||
return result;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue