summaryrefslogtreecommitdiff
path: root/zebra/interface.c
diff options
context:
space:
mode:
authorDonald Sharp <donaldsharp72@gmail.com>2024-02-02 12:51:35 -0500
committerGitHub <noreply@github.com>2024-02-02 12:51:35 -0500
commit3d57f0439533f415b0ab1c95e5fed15e099a32c3 (patch)
treea6b7a68a2b17eb3c4f3aded966cba85c83ed6b54 /zebra/interface.c
parent080054686fbfb30272106c5a18cf0f984cfb818f (diff)
parent42c1652dcb744d41178df1f5acad1e0d10cdf42b (diff)
Merge pull request #10151 from pguibert6WIND/ensure_routing_protocols_good_bw
zebra: avoid having speed set to UINT32_MAX
Diffstat (limited to 'zebra/interface.c')
-rw-r--r--zebra/interface.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/zebra/interface.c b/zebra/interface.c
index 6e33d7ec7d..6624eb2591 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -62,7 +62,7 @@ static void if_zebra_speed_update(struct event *thread)
* interfaces not available.
* note that loopback & virtual interfaces can return 0 as speed
*/
- if (error < 0)
+ if (error == INTERFACE_SPEED_ERROR_READ)
return;
if (new_speed != ifp->speed) {
@@ -73,7 +73,7 @@ static void if_zebra_speed_update(struct event *thread)
changed = true;
}
- if (changed || new_speed == UINT32_MAX) {
+ if (changed || error == INTERFACE_SPEED_ERROR_UNKNOWN) {
#define SPEED_UPDATE_SLEEP_TIME 5
#define SPEED_UPDATE_COUNT_MAX (4 * 60 / SPEED_UPDATE_SLEEP_TIME)
/*
@@ -88,7 +88,7 @@ static void if_zebra_speed_update(struct event *thread)
* to not update the system to keep track of that. This
* is far simpler to just stop trying after 4 minutes
*/
- if (new_speed == UINT32_MAX &&
+ if (error == INTERFACE_SPEED_ERROR_UNKNOWN &&
zif->speed_update_count == SPEED_UPDATE_COUNT_MAX)
return;