summaryrefslogtreecommitdiffstats
path: root/bfdd
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2018-10-19 20:53:33 +0200
committerRenato Westphal <renato@opensourcerouting.org>2018-10-20 17:39:05 +0200
commitaffa816bd6f0c3c575f99e5b7b8d0f03d83d5e40 (patch)
treea73de1289411d6dd2e3749e4895ac59a0b20e866 /bfdd
parentMerge pull request #3212 from donaldsharp/rmap_crash (diff)
downloadfrr-affa816bd6f0c3c575f99e5b7b8d0f03d83d5e40.tar.xz
frr-affa816bd6f0c3c575f99e5b7b8d0f03d83d5e40.zip
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>
Diffstat (limited to 'bfdd')
-rw-r--r--bfdd/bfdd_vty.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bfdd/bfdd_vty.c b/bfdd/bfdd_vty.c
index 51dd9cb26..8f8fff6b1 100644
--- a/bfdd/bfdd_vty.c
+++ b/bfdd/bfdd_vty.c
@@ -90,7 +90,7 @@ DEFUN_NOSH(bfd_enter, bfd_enter_cmd, "bfd", "Configure BFD peers\n")
DEFUN_NOSH(
bfd_peer_enter, bfd_peer_enter_cmd,
- "peer <A.B.C.D|X:X::X:X> [{multihop|local-address <A.B.C.D|X:X::X:X>|interface IFNAME|vrf NAME}]",
+ "peer <A.B.C.D|X:X::X:X> [{[multihop] local-address <A.B.C.D|X:X::X:X>|interface IFNAME|vrf NAME}]",
PEER_STR PEER_IPV4_STR PEER_IPV6_STR
MHOP_STR
LOCAL_STR LOCAL_IPV4_STR LOCAL_IPV6_STR