mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-05 11:48:50 +00:00
bgpd: command to remove profile configuration
To remove a BFD profile without removing the BFD configuration just call `neighbor <A.B.C.D|X:X::X:X|WORD> bfd`. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
This commit is contained in:
parent
55d1a98423
commit
68286f9619
@ -474,6 +474,7 @@ static int bgp_bfd_peer_param_set(struct peer *peer, uint32_t min_rx,
|
|||||||
uint32_t min_tx, uint8_t detect_mult,
|
uint32_t min_tx, uint8_t detect_mult,
|
||||||
int defaults)
|
int defaults)
|
||||||
{
|
{
|
||||||
|
struct bfd_info *bi;
|
||||||
struct peer_group *group;
|
struct peer_group *group;
|
||||||
struct listnode *node, *nnode;
|
struct listnode *node, *nnode;
|
||||||
int command = 0;
|
int command = 0;
|
||||||
@ -481,6 +482,10 @@ static int bgp_bfd_peer_param_set(struct peer *peer, uint32_t min_rx,
|
|||||||
bfd_set_param((struct bfd_info **)&(peer->bfd_info), min_rx, min_tx,
|
bfd_set_param((struct bfd_info **)&(peer->bfd_info), min_rx, min_tx,
|
||||||
detect_mult, defaults, &command);
|
detect_mult, defaults, &command);
|
||||||
|
|
||||||
|
/* This command overrides profile if it was previously applied. */
|
||||||
|
bi = peer->bfd_info;
|
||||||
|
bi->profile[0] = 0;
|
||||||
|
|
||||||
if (CHECK_FLAG(peer->sflags, PEER_STATUS_GROUP)) {
|
if (CHECK_FLAG(peer->sflags, PEER_STATUS_GROUP)) {
|
||||||
group = peer->group;
|
group = peer->group;
|
||||||
for (ALL_LIST_ELEMENTS(group->peer, node, nnode, peer)) {
|
for (ALL_LIST_ELEMENTS(group->peer, node, nnode, peer)) {
|
||||||
@ -489,6 +494,13 @@ static int bgp_bfd_peer_param_set(struct peer *peer, uint32_t min_rx,
|
|||||||
min_rx, min_tx, detect_mult, defaults,
|
min_rx, min_tx, detect_mult, defaults,
|
||||||
&command);
|
&command);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This command overrides profile if it was previously
|
||||||
|
* applied.
|
||||||
|
*/
|
||||||
|
bi = peer->bfd_info;
|
||||||
|
bi->profile[0] = 0;
|
||||||
|
|
||||||
if ((peer->status == Established)
|
if ((peer->status == Established)
|
||||||
&& (command == ZEBRA_BFD_DEST_REGISTER))
|
&& (command == ZEBRA_BFD_DEST_REGISTER))
|
||||||
bgp_bfd_register_peer(peer);
|
bgp_bfd_register_peer(peer);
|
||||||
|
Loading…
Reference in New Issue
Block a user