summaryrefslogtreecommitdiffstats
path: root/bfdd/bfd.c
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2021-03-10 20:11:19 +0100
committerIgor Ryzhov <iryzhov@nfware.com>2021-03-14 22:44:08 +0100
commit59dad8137ef0466d15240b49ece8710b31e4784f (patch)
tree1bd4c2b5b093d884c6bfed4265ebadc7daebb82b /bfdd/bfd.c
parentMerge pull request #8244 from opensourcerouting/ci-fix-tests (diff)
downloadfrr-59dad8137ef0466d15240b49ece8710b31e4784f.tar.xz
frr-59dad8137ef0466d15240b49ece8710b31e4784f.zip
bfdd: make sessions administratively up by default
Current behavior is inconsistent. When the session is created by another daemon, it is up by default. When we later configure peer in bfdd, the session is still up, but the NB layer thinks that it is down. More than that, even when the session is created in bfdd using peer command, it is created in DOWN state, not ADM_DOWN. And it actually starts sending and receiving packets. The sessions is marked with SHUTDOWN flag only when we try to reconfigure some parameter. This behavior is also very unexpected. Fixes #7780. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'bfdd/bfd.c')
-rw-r--r--bfdd/bfd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bfdd/bfd.c b/bfdd/bfd.c
index 499e54603..3cbb3691e 100644
--- a/bfdd/bfd.c
+++ b/bfdd/bfd.c
@@ -85,7 +85,7 @@ struct bfd_profile *bfd_profile_lookup(const char *name)
static void bfd_profile_set_default(struct bfd_profile *bp)
{
- bp->admin_shutdown = true;
+ bp->admin_shutdown = false;
bp->detection_multiplier = BFD_DEFDETECTMULT;
bp->echo_mode = false;
bp->passive = false;
@@ -206,7 +206,7 @@ void bfd_session_apply(struct bfd_session *bs)
bfd_set_passive_mode(bs, bs->peer_profile.passive);
/* Toggle 'no shutdown' if default value. */
- if (bs->peer_profile.admin_shutdown)
+ if (bs->peer_profile.admin_shutdown == false)
bfd_set_shutdown(bs, bp->admin_shutdown);
else
bfd_set_shutdown(bs, bs->peer_profile.admin_shutdown);