From affa816bd6f0c3c575f99e5b7b8d0f03d83d5e40 Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Fri, 19 Oct 2018 15:53:33 -0300 Subject: [PATCH] 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 --- bfdd/bfdd_vty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bfdd/bfdd_vty.c b/bfdd/bfdd_vty.c index 51dd9cb26d..8f8fff6b18 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 [{multihop|local-address |interface IFNAME|vrf NAME}]", + "peer [{[multihop] local-address |interface IFNAME|vrf NAME}]", PEER_STR PEER_IPV4_STR PEER_IPV6_STR MHOP_STR LOCAL_STR LOCAL_IPV4_STR LOCAL_IPV6_STR -- 2.39.5