mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-16 22:52:04 +00:00
Merge pull request #17558 from donaldsharp/bfd_fix
lib: Fix session re-establishment
This commit is contained in:
commit
9797f20a1e
@ -32,6 +32,8 @@ enum bfd_session_event {
|
|||||||
BSE_UNINSTALL,
|
BSE_UNINSTALL,
|
||||||
/** Install the BFD session configuration. */
|
/** Install the BFD session configuration. */
|
||||||
BSE_INSTALL,
|
BSE_INSTALL,
|
||||||
|
/** We should install but it couldn't because of a error talking to zebra */
|
||||||
|
BSE_VALID_FOR_INSTALL,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -527,6 +529,10 @@ static void _bfd_sess_send(struct event *t)
|
|||||||
vrf_id_to_name(bsp->args.vrf_id), bsp->args.vrf_id,
|
vrf_id_to_name(bsp->args.vrf_id), bsp->args.vrf_id,
|
||||||
bsp->lastev == BSE_INSTALL ? "installed"
|
bsp->lastev == BSE_INSTALL ? "installed"
|
||||||
: "uninstalled");
|
: "uninstalled");
|
||||||
|
|
||||||
|
bsp->installed = false;
|
||||||
|
if (bsp->lastev == BSE_INSTALL)
|
||||||
|
bsp->lastev = BSE_VALID_FOR_INSTALL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -883,7 +889,7 @@ int zclient_bfd_session_replay(ZAPI_CALLBACK_ARGS)
|
|||||||
/* Replay all activated peers. */
|
/* Replay all activated peers. */
|
||||||
TAILQ_FOREACH (bsp, &bsglobal.bsplist, entry) {
|
TAILQ_FOREACH (bsp, &bsglobal.bsplist, entry) {
|
||||||
/* Skip not installed sessions. */
|
/* Skip not installed sessions. */
|
||||||
if (!bsp->installed)
|
if (!bsp->installed && bsp->lastev != BSE_VALID_FOR_INSTALL)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* We are reconnecting, so we must send installation. */
|
/* We are reconnecting, so we must send installation. */
|
||||||
|
Loading…
Reference in New Issue
Block a user