diff --git a/bgpd/bgp_bfd.c b/bgpd/bgp_bfd.c index ba57db61cb..67b8018c8e 100644 --- a/bgpd/bgp_bfd.c +++ b/bgpd/bgp_bfd.c @@ -486,7 +486,7 @@ static int bgp_bfd_peer_param_set(struct peer *peer, uint32_t min_rx, int command = 0; bfd_set_param((struct bfd_info **)&(peer->bfd_info), min_rx, min_tx, - detect_mult, defaults, &command); + detect_mult, NULL, defaults, &command); /* This command overrides profile if it was previously applied. */ bi = peer->bfd_info; @@ -497,8 +497,8 @@ static int bgp_bfd_peer_param_set(struct peer *peer, uint32_t min_rx, for (ALL_LIST_ELEMENTS(group->peer, node, nnode, peer)) { command = 0; bfd_set_param((struct bfd_info **)&(peer->bfd_info), - min_rx, min_tx, detect_mult, defaults, - &command); + min_rx, min_tx, detect_mult, NULL, + defaults, &command); /* * This command overrides profile if it was previously @@ -564,7 +564,7 @@ static int bgp_bfd_peer_param_type_set(struct peer *peer, if (!peer->bfd_info) bfd_set_param((struct bfd_info **)&(peer->bfd_info), BFD_DEF_MIN_RX, BFD_DEF_MIN_TX, - BFD_DEF_DETECT_MULT, 1, &command); + BFD_DEF_DETECT_MULT, NULL, 1, &command); bfd_info = (struct bfd_info *)peer->bfd_info; bfd_info->type = type; @@ -577,7 +577,7 @@ static int bgp_bfd_peer_param_type_set(struct peer *peer, bfd_set_param( (struct bfd_info **)&(peer->bfd_info), BFD_DEF_MIN_RX, BFD_DEF_MIN_TX, - BFD_DEF_DETECT_MULT, 1, &command); + BFD_DEF_DETECT_MULT, NULL, 1, &command); bfd_info = (struct bfd_info *)peer->bfd_info; bfd_info->type = type; @@ -612,7 +612,7 @@ static int bgp_bfd_peer_set_profile(struct peer *peer, const char *profile) struct bfd_info *bfd_info; bfd_set_param((struct bfd_info **)&(peer->bfd_info), BFD_DEF_MIN_RX, - BFD_DEF_MIN_TX, BFD_DEF_DETECT_MULT, 1, &command); + BFD_DEF_MIN_TX, BFD_DEF_DETECT_MULT, NULL, 1, &command); bfd_info = (struct bfd_info *)peer->bfd_info; @@ -628,7 +628,7 @@ static int bgp_bfd_peer_set_profile(struct peer *peer, const char *profile) command = 0; bfd_set_param((struct bfd_info **)&(peer->bfd_info), BFD_DEF_MIN_RX, BFD_DEF_MIN_TX, - BFD_DEF_DETECT_MULT, 1, &command); + BFD_DEF_DETECT_MULT, NULL, 1, &command); bfd_info = (struct bfd_info *)peer->bfd_info; diff --git a/doc/user/bfd.rst b/doc/user/bfd.rst index 618d90a85e..47792317ad 100644 --- a/doc/user/bfd.rst +++ b/doc/user/bfd.rst @@ -254,7 +254,7 @@ IS-IS BFD Configuration The following commands are available inside the interface configuration node. .. index:: isis bfd -.. clicmd:: ip isis bfd +.. clicmd:: isis bfd Listen for BFD events on peers created on the interface. Every time a new neighbor is found a BFD peer is created to monitor the link @@ -269,6 +269,15 @@ The following commands are available inside the interface configuration node. IPv4 and IPv6 support are configured then just a IPv6 based session is created. +.. index:: isis bfd profile BFDPROF +.. clicmd:: isis bfd profile BFDPROF + + Use a BFD profile BFDPROF as provided in the BFD configuration. + +.. index:: no isis bfd profile BFDPROF +.. clicmd:: no isis bfd profile BFDPROF + + Removes any BFD profile if present. .. _bfd-ospf-peer-config: diff --git a/isisd/isis_bfd.c b/isisd/isis_bfd.c index 69c971ee2c..5729994baa 100644 --- a/isisd/isis_bfd.c +++ b/isisd/isis_bfd.c @@ -255,6 +255,43 @@ static void bfd_debug(int family, union g_addr *dst, union g_addr *src, command_str, dst_str, interface, src_str); } +static void bfd_command(int command, struct bfd_info *bfd_info, int family, + const void *dst_ip, const void *src_ip, + const char *if_name) +{ + struct bfd_session_arg args = {}; + size_t addrlen; + + args.cbit = 1; + args.family = family; + args.vrf_id = VRF_DEFAULT; + args.command = command; + args.bfd_info = bfd_info; + if (args.bfd_info) { + args.min_rx = bfd_info->required_min_rx; + args.min_tx = bfd_info->desired_min_tx; + args.detection_multiplier = bfd_info->detect_mult; + if (bfd_info->profile[0]) { + args.profilelen = strlen(bfd_info->profile); + strlcpy(args.profile, bfd_info->profile, + sizeof(args.profile)); + } + } + + addrlen = family == AF_INET ? sizeof(struct in_addr) + : sizeof(struct in6_addr); + memcpy(&args.dst, dst_ip, addrlen); + if (src_ip) + memcpy(&args.src, src_ip, addrlen); + + if (if_name) { + strlcpy(args.ifname, if_name, sizeof(args.ifname)); + args.ifnamelen = strlen(args.ifname); + } + + zclient_bfd_command(zclient, &args); +} + static void bfd_handle_adj_down(struct isis_adjacency *adj) { if (!adj->bfd_session) @@ -264,17 +301,11 @@ static void bfd_handle_adj_down(struct isis_adjacency *adj) &adj->bfd_session->src_ip, adj->circuit->interface->name, ZEBRA_BFD_DEST_DEREGISTER); - bfd_peer_sendmsg(zclient, NULL, adj->bfd_session->family, - &adj->bfd_session->dst_ip, &adj->bfd_session->src_ip, - (adj->circuit->interface) - ? adj->circuit->interface->name - : NULL, - 0, /* ttl */ - 0, /* multihop */ - 1, /* control plane independent bit is on */ - ZEBRA_BFD_DEST_DEREGISTER, - 0, /* set_flag */ - VRF_DEFAULT); + bfd_command(ZEBRA_BFD_DEST_DEREGISTER, NULL, adj->bfd_session->family, + &adj->bfd_session->dst_ip, &adj->bfd_session->src_ip, + (adj->circuit->interface) ? adj->circuit->interface->name + : NULL); + bfd_session_free(&adj->bfd_session); } @@ -324,18 +355,12 @@ static void bfd_handle_adj_up(struct isis_adjacency *adj, int command) bfd_debug(adj->bfd_session->family, &adj->bfd_session->dst_ip, &adj->bfd_session->src_ip, circuit->interface->name, command); - bfd_peer_sendmsg(zclient, circuit->bfd_info, adj->bfd_session->family, - &adj->bfd_session->dst_ip, - &adj->bfd_session->src_ip, - (adj->circuit->interface) - ? adj->circuit->interface->name - : NULL, - 0, /* ttl */ - 0, /* multihop */ - 1, /* control plane independent bit is on */ - command, - 0, /* set flag */ - VRF_DEFAULT); + + bfd_command(command, circuit->bfd_info, family, + &adj->bfd_session->dst_ip, &adj->bfd_session->src_ip, + (adj->circuit->interface) ? adj->circuit->interface->name + : NULL); + return; out: bfd_handle_adj_down(adj); @@ -383,14 +408,14 @@ void isis_bfd_circuit_cmd(struct isis_circuit *circuit, int command) } } -void isis_bfd_circuit_param_set(struct isis_circuit *circuit, - uint32_t min_rx, uint32_t min_tx, - uint32_t detect_mult, int defaults) +void isis_bfd_circuit_param_set(struct isis_circuit *circuit, uint32_t min_rx, + uint32_t min_tx, uint32_t detect_mult, + const char *profile, int defaults) { int command = 0; - bfd_set_param(&circuit->bfd_info, min_rx, - min_tx, detect_mult, defaults, &command); + bfd_set_param(&circuit->bfd_info, min_rx, min_tx, detect_mult, profile, + defaults, &command); if (command) isis_bfd_circuit_cmd(circuit, command); diff --git a/isisd/isis_bfd.h b/isisd/isis_bfd.h index 3193f16061..6ce630688c 100644 --- a/isisd/isis_bfd.h +++ b/isisd/isis_bfd.h @@ -22,9 +22,9 @@ struct isis_circuit; void isis_bfd_circuit_cmd(struct isis_circuit *circuit, int command); -void isis_bfd_circuit_param_set(struct isis_circuit *circuit, - uint32_t min_rx, uint32_t min_tx, - uint32_t detect_mult, int defaults); +void isis_bfd_circuit_param_set(struct isis_circuit *circuit, uint32_t min_rx, + uint32_t min_tx, uint32_t detect_mult, + const char *profile, int defaults); void isis_bfd_init(void); #endif diff --git a/isisd/isis_cli.c b/isisd/isis_cli.c index 28b98610b2..d864053b15 100644 --- a/isisd/isis_cli.c +++ b/isisd/isis_cli.c @@ -330,8 +330,7 @@ void cli_show_ip_isis_ipv6(struct vty *vty, struct lyd_node *dnode, DEFPY(isis_bfd, isis_bfd_cmd, "[no] isis bfd", - NO_STR - PROTO_HELP + NO_STR PROTO_HELP "Enable BFD support\n") { const struct lyd_node *dnode; @@ -343,19 +342,53 @@ DEFPY(isis_bfd, return CMD_SUCCESS; } - nb_cli_enqueue_change(vty, "./frr-isisd:isis/bfd-monitoring", + nb_cli_enqueue_change(vty, "./frr-isisd:isis/bfd-monitoring/enabled", NB_OP_MODIFY, no ? "false" : "true"); return nb_cli_apply_changes(vty, NULL); } +/* + * XPath: /frr-interface:lib/interface/frr-isisd:isis/bfd-monitoring/profile + */ +DEFPY(isis_bfd_profile, + isis_bfd_profile_cmd, + "[no] isis bfd profile WORD", + NO_STR PROTO_HELP + "Enable BFD support\n" + "Use a pre-configured profile\n" + "Profile name\n") +{ + const struct lyd_node *dnode; + + dnode = yang_dnode_get(vty->candidate_config->dnode, + "%s/frr-isisd:isis", VTY_CURR_XPATH); + if (dnode == NULL) { + vty_out(vty, "ISIS is not enabled on this circuit\n"); + return CMD_SUCCESS; + } + + nb_cli_enqueue_change(vty, "./frr-isisd:isis/bfd-monitoring/profile", + NB_OP_MODIFY, no ? NULL : profile); + + return nb_cli_apply_changes(vty, NULL); +} + void cli_show_ip_isis_bfd_monitoring(struct vty *vty, struct lyd_node *dnode, bool show_defaults) { - if (!yang_dnode_get_bool(dnode, NULL)) + const char *profile; + + if (!yang_dnode_get_bool(dnode, "./enabled")) vty_out(vty, " no"); vty_out(vty, " isis bfd\n"); + + if (yang_dnode_exists(dnode, "./profile")) { + profile = yang_dnode_get_string(dnode, "./profile"); + if (profile[0] != '\0') + vty_out(vty, " isis bfd profile %s\n", profile); + } } /* @@ -2281,6 +2314,7 @@ void isis_cli_init(void) install_element(INTERFACE_NODE, &ip6_router_isis_cmd); install_element(INTERFACE_NODE, &no_ip_router_isis_cmd); install_element(INTERFACE_NODE, &isis_bfd_cmd); + install_element(INTERFACE_NODE, &isis_bfd_profile_cmd); install_element(ISIS_NODE, &net_cmd); diff --git a/isisd/isis_nb.c b/isisd/isis_nb.c index 1d842eb13b..2b8b02e3f1 100644 --- a/isisd/isis_nb.c +++ b/isisd/isis_nb.c @@ -574,10 +574,23 @@ const struct frr_yang_module_info frr_isisd_info = { { .xpath = "/frr-interface:lib/interface/frr-isisd:isis/bfd-monitoring", .cbs = { - .modify = lib_interface_isis_bfd_monitoring_modify, + .apply_finish = lib_interface_isis_bfd_monitoring_apply_finish, .cli_show = cli_show_ip_isis_bfd_monitoring, } }, + { + .xpath = "/frr-interface:lib/interface/frr-isisd:isis/bfd-monitoring/enabled", + .cbs = { + .modify = lib_interface_isis_bfd_monitoring_enabled_modify, + } + }, + { + .xpath = "/frr-interface:lib/interface/frr-isisd:isis/bfd-monitoring/profile", + .cbs = { + .modify = lib_interface_isis_bfd_monitoring_profile_modify, + .destroy = lib_interface_isis_bfd_monitoring_profile_destroy, + } + }, { .xpath = "/frr-interface:lib/interface/frr-isisd:isis/csnp-interval", .cbs = { diff --git a/isisd/isis_nb.h b/isisd/isis_nb.h index e887b1a388..a9401bc86a 100644 --- a/isisd/isis_nb.h +++ b/isisd/isis_nb.h @@ -171,7 +171,14 @@ int lib_interface_isis_area_tag_modify(struct nb_cb_modify_args *args); int lib_interface_isis_ipv4_routing_modify(struct nb_cb_modify_args *args); int lib_interface_isis_ipv6_routing_modify(struct nb_cb_modify_args *args); int lib_interface_isis_circuit_type_modify(struct nb_cb_modify_args *args); -int lib_interface_isis_bfd_monitoring_modify(struct nb_cb_modify_args *args); +void lib_interface_isis_bfd_monitoring_apply_finish( + struct nb_cb_apply_finish_args *args); +int lib_interface_isis_bfd_monitoring_enabled_modify( + struct nb_cb_modify_args *args); +int lib_interface_isis_bfd_monitoring_profile_modify( + struct nb_cb_modify_args *args); +int lib_interface_isis_bfd_monitoring_profile_destroy( + struct nb_cb_destroy_args *args); int isis_instance_segment_routing_enabled_modify( struct nb_cb_modify_args *args); int isis_instance_segment_routing_enabled_modify( diff --git a/isisd/isis_nb_config.c b/isisd/isis_nb_config.c index 5fad974d25..6873c652f2 100644 --- a/isisd/isis_nb_config.c +++ b/isisd/isis_nb_config.c @@ -2029,26 +2029,53 @@ int lib_interface_isis_ipv6_routing_modify(struct nb_cb_modify_args *args) /* * XPath: /frr-interface:lib/interface/frr-isisd:isis/bfd-monitoring */ -int lib_interface_isis_bfd_monitoring_modify(struct nb_cb_modify_args *args) +void lib_interface_isis_bfd_monitoring_apply_finish( + struct nb_cb_apply_finish_args *args) { struct isis_circuit *circuit; - bool bfd_monitoring; - - if (args->event != NB_EV_APPLY) - return NB_OK; + bool enabled; + const char *profile = NULL; circuit = nb_running_get_entry(args->dnode, NULL, true); - bfd_monitoring = yang_dnode_get_bool(args->dnode, NULL); + enabled = yang_dnode_get_bool(args->dnode, "./enabled"); - if (bfd_monitoring) { + if (yang_dnode_exists(args->dnode, "./profile")) + profile = yang_dnode_get_string(args->dnode, "./profile"); + + if (enabled) { isis_bfd_circuit_param_set(circuit, BFD_DEF_MIN_RX, BFD_DEF_MIN_TX, BFD_DEF_DETECT_MULT, - true); + profile, true); } else { isis_bfd_circuit_cmd(circuit, ZEBRA_BFD_DEST_DEREGISTER); bfd_info_free(&circuit->bfd_info); } +} +/* + * XPath: /frr-interface:lib/interface/frr-isisd:isis/bfd-monitoring/enabled + */ +int lib_interface_isis_bfd_monitoring_enabled_modify( + struct nb_cb_modify_args *args) +{ + /* Everything done in apply_finish */ + return NB_OK; +} + +/* + * XPath: /frr-interface:lib/interface/frr-isisd:isis/bfd-monitoring/profile + */ +int lib_interface_isis_bfd_monitoring_profile_modify( + struct nb_cb_modify_args *args) +{ + /* Everything done in apply_finish */ + return NB_OK; +} + +int lib_interface_isis_bfd_monitoring_profile_destroy( + struct nb_cb_destroy_args *args) +{ + /* Everything done in apply_finish */ return NB_OK; } diff --git a/isisd/isis_vty_fabricd.c b/isisd/isis_vty_fabricd.c index 562881bbdb..a574c5bd3f 100644 --- a/isisd/isis_vty_fabricd.c +++ b/isisd/isis_vty_fabricd.c @@ -315,8 +315,8 @@ DEFUN (isis_bfd, return CMD_SUCCESS; } - isis_bfd_circuit_param_set(circuit, BFD_DEF_MIN_RX, - BFD_DEF_MIN_TX, BFD_DEF_DETECT_MULT, true); + isis_bfd_circuit_param_set(circuit, BFD_DEF_MIN_RX, BFD_DEF_MIN_TX, + BFD_DEF_DETECT_MULT, NULL, true); return CMD_SUCCESS; } diff --git a/lib/bfd.c b/lib/bfd.c index 6173ebc197..d1a0ec671e 100644 --- a/lib/bfd.c +++ b/lib/bfd.c @@ -94,7 +94,8 @@ int bfd_validate_param(struct vty *vty, const char *dm_str, const char *rx_str, * bfd_set_param - Set the configured BFD paramter values */ void bfd_set_param(struct bfd_info **bfd_info, uint32_t min_rx, uint32_t min_tx, - uint8_t detect_mult, int defaults, int *command) + uint8_t detect_mult, const char *profile, int defaults, + int *command) { if (!*bfd_info) { *bfd_info = bfd_info_create(); @@ -102,7 +103,8 @@ void bfd_set_param(struct bfd_info **bfd_info, uint32_t min_rx, uint32_t min_tx, } else { if (((*bfd_info)->required_min_rx != min_rx) || ((*bfd_info)->desired_min_tx != min_tx) - || ((*bfd_info)->detect_mult != detect_mult)) + || ((*bfd_info)->detect_mult != detect_mult) + || (profile && strcmp((*bfd_info)->profile, profile))) *command = ZEBRA_BFD_DEST_UPDATE; } @@ -110,6 +112,11 @@ void bfd_set_param(struct bfd_info **bfd_info, uint32_t min_rx, uint32_t min_tx, (*bfd_info)->required_min_rx = min_rx; (*bfd_info)->desired_min_tx = min_tx; (*bfd_info)->detect_mult = detect_mult; + if (profile) + strlcpy((*bfd_info)->profile, profile, + BFD_PROFILE_NAME_LEN); + else + (*bfd_info)->profile[0] = '\0'; } if (!defaults) @@ -121,6 +128,8 @@ void bfd_set_param(struct bfd_info **bfd_info, uint32_t min_rx, uint32_t min_tx, /* * bfd_peer_sendmsg - Format and send a peer register/Unregister * command to Zebra to be forwarded to BFD + * + * DEPRECATED: use zclient_bfd_command instead */ void bfd_peer_sendmsg(struct zclient *zclient, struct bfd_info *bfd_info, int family, void *dst_ip, void *src_ip, char *if_name, @@ -161,6 +170,11 @@ void bfd_peer_sendmsg(struct zclient *zclient, struct bfd_info *bfd_info, args.min_rx = bfd_info->required_min_rx; args.min_tx = bfd_info->desired_min_tx; args.detection_multiplier = bfd_info->detect_mult; + if (bfd_info->profile[0]) { + args.profilelen = strlen(bfd_info->profile); + strlcpy(args.profile, bfd_info->profile, + sizeof(args.profile)); + } } addrlen = family == AF_INET ? sizeof(struct in_addr) @@ -425,6 +439,15 @@ int zclient_bfd_command(struct zclient *zc, struct bfd_session_arg *args) struct stream *s; size_t addrlen; + /* Individual reg/dereg messages are suppressed during shutdown. */ + if (CHECK_FLAG(bfd_gbl.flags, BFD_GBL_FLAG_IN_SHUTDOWN)) { + if (bfd_debug) + zlog_debug( + "%s: Suppressing BFD peer reg/dereg messages", + __func__); + return -1; + } + /* Check socket. */ if (!zc || zc->sock < 0) { if (bfd_debug) diff --git a/lib/bfd.h b/lib/bfd.h index d7d4b5fe35..ceab4628b6 100644 --- a/lib/bfd.h +++ b/lib/bfd.h @@ -92,8 +92,8 @@ extern int bfd_validate_param(struct vty *vty, const char *dm_str, uint32_t *tx_val); extern void bfd_set_param(struct bfd_info **bfd_info, uint32_t min_rx, - uint32_t min_tx, uint8_t detect_mult, int defaults, - int *command); + uint32_t min_tx, uint8_t detect_mult, + const char *profile, int defaults, int *command); extern void bfd_peer_sendmsg(struct zclient *zclient, struct bfd_info *bfd_info, int family, void *dst_ip, void *src_ip, char *if_name, int ttl, int multihop, int cbit, diff --git a/ospf6d/ospf6_bfd.c b/ospf6d/ospf6_bfd.c index 4e7a0050aa..916e59baf0 100644 --- a/ospf6d/ospf6_bfd.c +++ b/ospf6d/ospf6_bfd.c @@ -308,7 +308,7 @@ static void ospf6_bfd_if_param_set(struct ospf6_interface *oi, uint32_t min_rx, int command = 0; bfd_set_param((struct bfd_info **)&(oi->bfd_info), min_rx, min_tx, - detect_mult, defaults, &command); + detect_mult, NULL, defaults, &command); if (command) ospf6_bfd_reg_dereg_all_nbr(oi, command); } diff --git a/ospfd/ospf_bfd.c b/ospfd/ospf_bfd.c index b9e78f4cd3..d2c5090f2f 100644 --- a/ospfd/ospf_bfd.c +++ b/ospfd/ospf_bfd.c @@ -381,7 +381,7 @@ static void ospf_bfd_if_param_set(struct interface *ifp, uint32_t min_rx, params = IF_DEF_PARAMS(ifp); bfd_set_param((struct bfd_info **)&(params->bfd_info), min_rx, min_tx, - detect_mult, defaults, &command); + detect_mult, NULL, defaults, &command); if (command) ospf_bfd_reg_dereg_all_nbr(ifp, command); } diff --git a/pimd/pim_bfd.c b/pimd/pim_bfd.c index 0df8ea6922..146b53fa8f 100644 --- a/pimd/pim_bfd.c +++ b/pimd/pim_bfd.c @@ -194,7 +194,7 @@ void pim_bfd_if_param_set(struct interface *ifp, uint32_t min_rx, if (!pim_ifp) return; - bfd_set_param(&(pim_ifp->bfd_info), min_rx, min_tx, detect_mult, + bfd_set_param(&(pim_ifp->bfd_info), min_rx, min_tx, detect_mult, NULL, defaults, &command); if (pim_ifp->bfd_info) { diff --git a/tests/topotests/bfd-profiles-topo1/r3/bfd-peers-initial.json b/tests/topotests/bfd-profiles-topo1/r3/bfd-peers-initial.json index abca1ed131..d2d0c601c3 100644 --- a/tests/topotests/bfd-profiles-topo1/r3/bfd-peers-initial.json +++ b/tests/topotests/bfd-profiles-topo1/r3/bfd-peers-initial.json @@ -25,14 +25,14 @@ "local": "*", "multihop": false, "peer": "*", - "receive-interval": 300, + "receive-interval": 250, "remote-detect-multiplier": 3, "remote-diagnostic": "ok", "remote-id": "*", "remote-receive-interval": 300, "remote-transmit-interval": 300, "status": "up", - "transmit-interval": 300, + "transmit-interval": 250, "uptime": "*", "vrf": "default" } diff --git a/tests/topotests/bfd-profiles-topo1/r3/bfdd.conf b/tests/topotests/bfd-profiles-topo1/r3/bfdd.conf index 74dae5a60d..08eb0468d6 100644 --- a/tests/topotests/bfd-profiles-topo1/r3/bfdd.conf +++ b/tests/topotests/bfd-profiles-topo1/r3/bfdd.conf @@ -3,9 +3,8 @@ debug bfd network debug bfd zebra ! bfd - ! profile is commented out on purpose. - !profile fasttx - ! receive-interval 250 - ! transmit-interval 250 - !! + profile fasttx + receive-interval 250 + transmit-interval 250 + ! ! diff --git a/tests/topotests/bfd-profiles-topo1/r3/bgpd.conf b/tests/topotests/bfd-profiles-topo1/r3/bgpd.conf index 9c56a349ed..c7b75d2fde 100644 --- a/tests/topotests/bfd-profiles-topo1/r3/bgpd.conf +++ b/tests/topotests/bfd-profiles-topo1/r3/bgpd.conf @@ -1,7 +1,7 @@ router bgp 100 bgp router-id 10.254.254.3 neighbor 172.16.1.2 remote-as 100 - neighbor 172.16.1.2 bfd profile fasttx + neighbor 172.16.1.2 bfd profile DOES_NOT_EXIST address-family ipv4 unicast redistribute connected exit-address-family diff --git a/tests/topotests/bfd-profiles-topo1/r3/isisd.conf b/tests/topotests/bfd-profiles-topo1/r3/isisd.conf index 5d774a356b..d27a783adf 100644 --- a/tests/topotests/bfd-profiles-topo1/r3/isisd.conf +++ b/tests/topotests/bfd-profiles-topo1/r3/isisd.conf @@ -8,6 +8,7 @@ interface r3-eth1 ipv6 router isis lan isis circuit-type level-1 isis bfd + isis bfd profile fasttx ! router isis lan net 10.0000.0000.0000.0000.0000.0000.0000.0000.0001.00 diff --git a/tests/topotests/bfd-profiles-topo1/r4/bfd-peers-initial.json b/tests/topotests/bfd-profiles-topo1/r4/bfd-peers-initial.json index c8bc4c20e9..2c2e136abf 100644 --- a/tests/topotests/bfd-profiles-topo1/r4/bfd-peers-initial.json +++ b/tests/topotests/bfd-profiles-topo1/r4/bfd-peers-initial.json @@ -11,8 +11,8 @@ "remote-detect-multiplier": 3, "remote-diagnostic": "ok", "remote-id": "*", - "remote-receive-interval": 300, - "remote-transmit-interval": 300, + "remote-receive-interval": 250, + "remote-transmit-interval": 250, "status": "up", "transmit-interval": 300, "uptime": "*", diff --git a/tests/topotests/bfd-profiles-topo1/r4/bgpd.conf b/tests/topotests/bfd-profiles-topo1/r4/bgpd.conf index 7c4b39b020..aff1016dee 100644 --- a/tests/topotests/bfd-profiles-topo1/r4/bgpd.conf +++ b/tests/topotests/bfd-profiles-topo1/r4/bgpd.conf @@ -5,7 +5,7 @@ router bgp 200 no bgp ebgp-requires-policy neighbor 2001:db8:1::2 remote-as 100 neighbor 2001:db8:1::2 ebgp-multihop 2 - neighbor 2001:db8:1::2 bfd profile fasttx + neighbor 2001:db8:1::2 bfd profile DOES_NOT_EXIST address-family ipv4 unicast redistribute connected exit-address-family diff --git a/tests/topotests/bfd-profiles-topo1/r4/isisd.conf b/tests/topotests/bfd-profiles-topo1/r4/isisd.conf index 477740087d..01e197bed5 100644 --- a/tests/topotests/bfd-profiles-topo1/r4/isisd.conf +++ b/tests/topotests/bfd-profiles-topo1/r4/isisd.conf @@ -8,6 +8,7 @@ interface r4-eth0 ipv6 router isis lan isis circuit-type level-1 isis bfd + isis bfd profile DOES_NOT_EXIST ! router isis lan net 10.0000.0000.0000.0000.0000.0000.0000.0000.0002.00 diff --git a/tests/topotests/bfd-profiles-topo1/test_bfd_profiles_topo1.py b/tests/topotests/bfd-profiles-topo1/test_bfd_profiles_topo1.py old mode 100644 new mode 100755 diff --git a/yang/frr-isisd.yang b/yang/frr-isisd.yang index befdc3467d..1bb693a1ef 100644 --- a/yang/frr-isisd.yang +++ b/yang/frr-isisd.yang @@ -361,11 +361,18 @@ module frr-isisd { "IS-type of this circuit."; } - leaf bfd-monitoring { - type boolean; - default "false"; - description - "Monitor IS-IS peers on this circuit."; + container bfd-monitoring { + leaf enabled { + type boolean; + default "false"; + description + "Monitor IS-IS peers on this circuit."; + } + leaf profile { + type string; + description + "Let BFD use a pre-configured profile."; + } } container csnp-interval {