diff options
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; |
