diff options
Diffstat (limited to 'pathd/path_pcep.c')
| -rw-r--r-- | pathd/path_pcep.c | 31 |
1 files changed, 7 insertions, 24 deletions
diff --git a/pathd/path_pcep.c b/pathd/path_pcep.c index 2f9ff4f0f0..d6cd48ecdb 100644 --- a/pathd/path_pcep.c +++ b/pathd/path_pcep.c @@ -17,8 +17,9 @@ */ #include <zebra.h> -#include <pcep_utils_counters.h> +#include "pceplib/pcep_utils_counters.h" +#include "memory.h" #include "log.h" #include "command.h" #include "libfrr.h" @@ -31,13 +32,13 @@ #include "pathd/pathd.h" #include "pathd/path_errors.h" -#include "pathd/path_pcep_memory.h" #include "pathd/path_pcep.h" #include "pathd/path_pcep_cli.h" #include "pathd/path_pcep_controller.h" #include "pathd/path_pcep_lib.h" #include "pathd/path_pcep_config.h" +DEFINE_MTYPE(PATHD, PCEP, "PCEP module"); /* * Globals. @@ -215,29 +216,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; @@ -336,4 +318,5 @@ int pcep_module_init(void) FRR_MODULE_SETUP(.name = "frr_pathd_pcep", .version = FRR_VERSION, .description = "FRR pathd PCEP module", - .init = pcep_module_init) + .init = pcep_module_init, +); |
