summaryrefslogtreecommitdiff
path: root/zebra/interface.h
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2020-04-15 15:16:11 +0200
committerPhilippe Guibert <philippe.guibert@6wind.com>2024-01-29 14:52:32 +0100
commit51cb6aee4b699d4f2fcf0f913a15cbbc6ff11598 (patch)
tree766bbe0a781462d7e79a01a9dd0bdd8afc919bb1 /zebra/interface.h
parentf8755d7f866d4ae74d01b2ef9baa6829bdb99f63 (diff)
zebra: fix speed set to UINT32_MAX
get_iflink_speed() returns UINT32_MAX when the speeds is unknown. Routing daemons (at least ospfd) interprets it as the high value. Return errors in get_iflink_speed() to avoid the confusion. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com> Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Diffstat (limited to 'zebra/interface.h')
-rw-r--r--zebra/interface.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/zebra/interface.h b/zebra/interface.h
index fc6850e80e..7d633f32d2 100644
--- a/zebra/interface.h
+++ b/zebra/interface.h
@@ -201,6 +201,9 @@ struct zebra_if {
ifindex_t link_ifindex;
struct interface *link;
+#define INTERFACE_SPEED_ERROR_READ -1
+#define INTERFACE_SPEED_ERROR_UNKNOWN -2
+
uint8_t speed_update_count;
struct event *speed_update;