From: Renato Westphal Date: Fri, 19 Oct 2018 18:53:33 +0000 (-0300) Subject: bfdd: do not allow multihop peers without a local-address X-Git-Tag: frr-6.0.1~6^2~12 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=f074a986aedadbd939724a84c4501df89b678d01;p=mirror%2Ffrr.git 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 --- diff --git a/bfdd/bfdd_vty.c b/bfdd/bfdd_vty.c index ae6081f01a..236c3d5644 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