platform: limit retry count on link change
This is a nice safeguard, also consistent with ip_route_get().
This commit is contained in:

committed by
Thomas Haller

parent
fee7832bde
commit
090ff4ae95
@@ -8251,6 +8251,7 @@ do_change_link(NMPlatform *platform,
|
|||||||
const char *log_detail;
|
const char *log_detail;
|
||||||
gs_free char *log_detail_free = NULL;
|
gs_free char *log_detail_free = NULL;
|
||||||
const NMPObject *obj_cache;
|
const NMPObject *obj_cache;
|
||||||
|
int try_count = 0;
|
||||||
|
|
||||||
if (!nm_platform_netns_push(platform, &netns)) {
|
if (!nm_platform_netns_push(platform, &netns)) {
|
||||||
log_level = LOGL_ERR;
|
log_level = LOGL_ERR;
|
||||||
@@ -8329,7 +8330,7 @@ out:
|
|||||||
wait_for_nl_response_to_string(seq_result, extack_msg, s_buf, sizeof(s_buf)),
|
wait_for_nl_response_to_string(seq_result, extack_msg, s_buf, sizeof(s_buf)),
|
||||||
log_detail);
|
log_detail);
|
||||||
|
|
||||||
if (result == -EAGAIN)
|
if (result == -EAGAIN && ++try_count < RESYNC_RETRIES)
|
||||||
goto retry;
|
goto retry;
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
Reference in New Issue
Block a user