diff options
| author | Javier Garcia <javier.garcia@voltanet.io> | 2021-01-22 10:38:12 +0100 |
|---|---|---|
| committer | Javier Garcia <javier.garcia@voltanet.io> | 2021-03-05 12:12:47 +0100 |
| commit | 749714731ee9a59ae39be77e7db3915ce3ad0bd8 (patch) | |
| tree | 2a50fcd5ce5c2f01ac381ba769c3d8f145768f9d /pathd/path_pcep.c | |
| parent | 40c1b0e6b8ad0a76f159885cb1a866f645b917fd (diff) | |
pceplib: Integrate pcelib into frr
Signed-off-by: Brady Johnson <brady@voltanet.io>
Co-authored-by: Javier Garcia <javier.garcia@voltanet.io>
Signed-off-by: Javier Garcia <javier.garcia@voltanet.io>
Diffstat (limited to 'pathd/path_pcep.c')
| -rw-r--r-- | pathd/path_pcep.c | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/pathd/path_pcep.c b/pathd/path_pcep.c index 2f9ff4f0f0..8b5ca8aff3 100644 --- a/pathd/path_pcep.c +++ b/pathd/path_pcep.c @@ -17,7 +17,7 @@ */ #include <zebra.h> -#include <pcep_utils_counters.h> +#include "pceplib/pcep_utils_counters.h" #include "log.h" #include "command.h" @@ -215,29 +215,10 @@ int pcep_main_event_update_candidate(struct path *path) ret = path_pcep_config_update_path(path); if (ret != PATH_NB_ERR && path->srp_id != 0) { - /* ODL and Cisco requires the first reported - * LSP to have a DOWN status, the later status changes - * will be comunicated through hook calls. - */ - enum pcep_lsp_operational_status real_status; if ((resp = path_pcep_config_get_path(&path->nbkey))) { resp->srp_id = path->srp_id; - real_status = resp->status; - resp->status = PCEP_LSP_OPERATIONAL_DOWN; - pcep_ctrl_send_report(pcep_g->fpt, path->pcc_id, resp); - /* If the update did not have any effect and the real - * status is not DOWN, we need to send a second report - * so the PCE is aware of the real status. This is due - * to the fact that NO notification will be received - * if the update did not apply any changes */ - if ((ret == PATH_NB_NO_CHANGE) - && (real_status != PCEP_LSP_OPERATIONAL_DOWN)) { - resp->status = real_status; - resp->srp_id = 0; - pcep_ctrl_send_report(pcep_g->fpt, path->pcc_id, - resp); - } - pcep_free_path(resp); + pcep_ctrl_send_report(pcep_g->fpt, path->pcc_id, resp, + ret == PATH_NB_NO_CHANGE); } } return ret; |
