Commit Graph

60 Commits

Author SHA1 Message Date
Renato Westphal
affa816bd6 bfdd: do not allow multihop peers without a local-address
The BFD code assumes that multihop peers have a local address
configured. When that doesn't happen, the BFD client daemons fail to
decode some BFD ZAPI messages and abort. To fix this, do not accept the
configuration of multhop peers unless a local-address is configured.

Fixes the following segfaults:
- bgpd aborted: vtysh -c "configure terminal" -c "bfd" -c "peer 1.1.1.1 multihop"
- bgpd aborted: vtysh -c "configure terminal" -c "bfd" -c "peer 1.1.1.1 multihop vrf NAME"
- bgpd aborted: vtysh -c "configure terminal" -c "bfd" -c "peer 1.1.1.1 vrf NAME multihop"
- ospf6d aborted: vtysh -c "configure terminal" -c "bfd" -c "peer 1.1.1.1 multihop"
- ospf6d aborted: vtysh -c "configure terminal" -c "bfd" -c "peer 1.1.1.1 multihop vrf NAME"
- ospf6d aborted: vtysh -c "configure terminal" -c "bfd" -c "peer 1.1.1.1 vrf NAME multihop"

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2018-10-20 12:39:05 -03:00
F. Aragon
4848ef7430
bfdd zebra: dead code (Coverity 1472624 1473199)
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-09-26 17:50:33 +02:00
Rafael Zalamena
8a9f760ed9 bfdd: remove VxLAN code
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>
2018-09-03 10:41:33 -03:00
Rafael Zalamena
0684c9b12c bfdd: add new counters and command to show them
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>
2018-08-15 17:09:54 -03:00
Rafael Zalamena
89a634c1f8 bfdd: turn repeatable code into functions
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>
2018-08-15 17:09:54 -03:00
Rafael Zalamena
98ef9c165c bfdd: fix downtime display
BFD peer status show command was using the wrong variable to display the
downtime counter.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-08-14 17:52:14 -03:00
Rafael Zalamena
f85498ef0a bfdd: show single hop local-address
Show local-address on single hop when configured.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-08-08 18:25:08 -03:00
Rafael Zalamena
d3f3a2c4dc bfdd: smooth configuration transition
After configuring a new value set the polling bit to negotiate speeds
again next transmission cycle.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-08-08 18:25:08 -03:00
Rafael Zalamena
674680df69 bfdd: show the correct transmission speed
When configured transmission speed doesn't match the actual speed, show
the difference in the output.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-08-08 18:25:08 -03:00
Rafael Zalamena
c2f29cf3d7 bfdd: add vty shell commands
Implement vty shell integration and allow `bfdd` to be configured
through FRR's vtysh.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-08-08 18:25:04 -03:00