diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2023-02-16 13:25:17 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2023-03-29 11:49:58 +0200 |
commit | e45b27a937a1439871be904f5ec0ff1fb7e3af7c (patch) | |
tree | 7f22f038e5d5e3f7b240031c8acda0554aac946d | |
parent | ef6d8cf1a8f75b6f32e5b25664572b569d871590 (diff) |
platform: create a define for retry count when netlink drops data
We're going to use it elsewhere.
-rw-r--r-- | src/libnm-platform/nm-linux-platform.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libnm-platform/nm-linux-platform.c b/src/libnm-platform/nm-linux-platform.c index fe42a3b110..3845a2383c 100644 --- a/src/libnm-platform/nm-linux-platform.c +++ b/src/libnm-platform/nm-linux-platform.c @@ -328,6 +328,10 @@ struct _ifla_vf_vlan_info { /*****************************************************************************/ +#define RESYNC_RETRIES 10 + +/*****************************************************************************/ + typedef struct { guint16 family_id; } GenlFamilyData; @@ -9850,7 +9854,8 @@ ip_route_get(NMPlatform *platform, /* Retry, if we failed due to a cache resync. That can happen when the netlink * socket fills up and we lost the response. */ - } while (seq_result == WAIT_FOR_NL_RESPONSE_RESULT_FAILED_RESYNC && ++try_count < 10); + } while (seq_result == WAIT_FOR_NL_RESPONSE_RESULT_FAILED_RESYNC + && ++try_count < RESYNC_RETRIES); if (seq_result < 0) { /* negative seq_result is an errno from kernel. Map it to negative |