diff options
author | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2019-06-24 23:26:04 +0200 |
---|---|---|
committer | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2019-06-25 14:06:48 +0200 |
commit | 77452ad263562ab9cca989da1df9a9ad2afd17e1 (patch) | |
tree | 5a27244de16172587ddb0d393711fe8b246704f9 | |
parent | bfdd: fix compilation warnings on OmniOS (diff) | |
download | frr-77452ad263562ab9cca989da1df9a9ad2afd17e1.tar.xz frr-77452ad263562ab9cca989da1df9a9ad2afd17e1.zip |
bfdd: small tweaks on northbound
* Change `ERR_VALIDATION` to `ERR_INCONSISTENCY` to error on
inconsistent state.
* Duplicated sanity checks:
* Remove detection multiplier sanity check.
* Remove duplicated session sanity check.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
-rw-r--r-- | bfdd/bfdd_northbound.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/bfdd/bfdd_northbound.c b/bfdd/bfdd_northbound.c index 0d3139462..cb097248c 100644 --- a/bfdd/bfdd_northbound.c +++ b/bfdd/bfdd_northbound.c @@ -72,12 +72,6 @@ int bfd_session_create(enum nb_event event, const struct lyd_node *dnode, switch (event) { case NB_EV_VALIDATE: - bfd_session_get_key(mhop, dnode, &bk); - bs = bfd_key_lookup(bk); - - /* This session was already configured by CLI. */ - if (bs != NULL && BFD_CHECK_FLAG(bs->flags, BFD_SESS_FLAG_CONFIG)) - return NB_ERR_VALIDATION; break; case NB_EV_PREPARE: @@ -142,7 +136,7 @@ int bfd_session_destroy(enum nb_event event, const struct lyd_node *dnode, case NB_EV_VALIDATE: bfd_session_get_key(mhop, dnode, &bk); if (bfd_key_lookup(bk) == NULL) - return NB_ERR_VALIDATION; + return NB_ERR_INCONSISTENCY; break; case NB_EV_PREPARE: @@ -296,8 +290,6 @@ static int bfdd_bfd_sessions_single_hop_detection_multiplier_modify( switch (event) { case NB_EV_VALIDATE: - if (detection_multiplier == 1) - return NB_ERR_VALIDATION; break; case NB_EV_PREPARE: |