summaryrefslogtreecommitdiff
path: root/zebra/rt_socket.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-01-10 19:01:57 -0500
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-01-11 09:52:34 -0500
commitdc7b3caefbd8baccb7fc3787a774e78d1a96636f (patch)
tree4e3f84078ba581eba5b1fd3c42b2a6c4008e6f38 /zebra/rt_socket.c
parentc1240044fbf081bb7407b1449d3954e4b63fec9f (diff)
zebra: Add one-shot thread to recheck speed
There are certain interfaces that when brought up and we receive the netlink notification about it, the speed of the interface is not set correctly. This creates a one-shot thread that will wait 15 seconds and then requery the speed and if it is different it will renotify the running daemons. The kernel should notify us on speed changes, unfortunately this is not done currently via a netlink message as you would think. As I understand it there is some in-fighting about the proper way to approach this issue and due to the way the kernel release cycle works we are a ways off from getting this fixed. This is a `hack` to make us work correctly while we wait for the true answer. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'zebra/rt_socket.c')
-rw-r--r--zebra/rt_socket.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/zebra/rt_socket.c b/zebra/rt_socket.c
index 0d1a80e737..0c29f0650c 100644
--- a/zebra/rt_socket.c
+++ b/zebra/rt_socket.c
@@ -473,4 +473,9 @@ extern int kernel_interface_set_master(struct interface *master,
return 0;
}
+uint32_t kernel_get_speed(struct interface *ifp)
+{
+ return ifp->speed;
+}
+
#endif /* !HAVE_NETLINK */