Allow `bfdd` to configure inexisting interfaces / VRF and only activate
them once the interface/VRF start existing. This implementation doesn't
handle dynamic VRFs yet.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Use internal data to lookup sessions. This approach has two main
advantages:
* it uses less memory because it doesn't use strings for interface /
vrf, it uses OS indexes instead;
* prepares code to support VRF;
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Remove some legacy left overs of the old timer data structure bits and
use a simpler version:
We always keep the current configuration in the timer structure, but
also keep the running timers (before poll transition) in
`cur_timers`.
With this we can remove `new_timers` and avoid timer copy
configuration copy on final handler (this also simplifies peer
show command).
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
RFC 5880 says that it is only necessary to run polling in two cases:
- Desired minimum transmission interval;
- Required minimum receive interval;
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Remove all polling negotiation when starting/stopping `echo-mode` as it
is not necessary.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
This will prevent vtysh from displaying `command imcomplete`
for a `show debugging` issued and we are running this
bfd daemon. A quick look showed me that there was not
really the ability to turn on/off debugging like other
daemons. I imagine future work can be focused here.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Remove all VxLAN code. There are probably better ways to write VxLAN
support without having to use raw sockets and depend on extra user
configuration input.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Added 3 new counters to BFD sessions:
* Session up events count;
* Session down events count;
* Zebra notifications count;
In addition to previosly available counters:
* Count of received control packets;
* Count of transmitted control packets;
* Count of received echo packets;
* Count of transmitted echo packets;
With this count we are able to visualize the BFD activity, bandwidth
usage, interface/network flapping and excess of zebra notifications.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Turn some code that will be repeated in the next commits into functions
so we avoid that.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
BFD peer status show command was using the wrong variable to display the
downtime counter.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
After configuring a new value set the polling bit to negotiate speeds
again next transmission cycle.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
When configured transmission speed doesn't match the actual speed, show
the difference in the output.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Implement vty shell integration and allow `bfdd` to be configured
through FRR's vtysh.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>