diff options
Diffstat (limited to 'pathd')
| -rw-r--r-- | pathd/path_cli.c | 16 | ||||
| -rw-r--r-- | pathd/path_pcep_pcc.c | 3 | ||||
| -rw-r--r-- | pathd/pathd.c | 6 |
3 files changed, 11 insertions, 14 deletions
diff --git a/pathd/path_cli.c b/pathd/path_cli.c index 7a28449e4e..172737c9d4 100644 --- a/pathd/path_cli.c +++ b/pathd/path_cli.c @@ -351,8 +351,6 @@ static int segment_list_has_src_dst( nb_cli_enqueue_change(vty, xpath, NB_OP_MODIFY, "ipv6_adjacency"); node_src_id = adj_src_ipv6_str; - } else { - return CMD_ERR_NO_MATCH; } /* addresses */ snprintf(xpath, XPATH_MAXLEN, "./segment[index='%s']/nai/local-address", @@ -421,8 +419,6 @@ int segment_list_has_prefix( sizeof(buf_prefix)); pre_ipaddr.ipa_type = IPADDR_V6; pre_ipaddr.ip._v6_addr = prefix_cli.u.prefix6; - } else { - return CMD_ERR_NO_MATCH; } snprintf(xpath, XPATH_MAXLEN, "./segment[index='%s']/nai/local-address", index_str); @@ -524,7 +520,7 @@ DEFPY(srte_segment_list_segment, srte_segment_list_segment_cmd, if (status != CMD_SUCCESS) return status; } else { - segment_list_has_prefix( + status = segment_list_has_prefix( vty, xpath, index, index_str, prefix_ipv4, prefix_ipv4_str, prefix_ipv6, prefix_ipv6_str, has_algo, algo, algo_str, has_iface_id, iface_id, iface_id_str); @@ -821,9 +817,8 @@ DEFPY(srte_candidate_no_bandwidth, return nb_cli_apply_changes(vty, NULL); } -DEFPY(srte_candidate_affinity_filter, - srte_candidate_affinity_filter_cmd, - "affinity {exclude-any|include-any|include-all}$type BITPATTERN$value", +DEFPY(srte_candidate_affinity_filter, srte_candidate_affinity_filter_cmd, + "affinity <exclude-any|include-any|include-all>$type BITPATTERN$value", "Affinity constraint\n" "Exclude any matching link\n" "Include any matching link\n" @@ -846,9 +841,8 @@ DEFPY(srte_candidate_affinity_filter, return nb_cli_apply_changes(vty, NULL); } -DEFPY(srte_candidate_no_affinity_filter, - srte_candidate_no_affinity_filter_cmd, - "no affinity {exclude-any|include-any|include-all}$type [BITPATTERN$value]", +DEFPY(srte_candidate_no_affinity_filter, srte_candidate_no_affinity_filter_cmd, + "no affinity <exclude-any|include-any|include-all>$type [BITPATTERN$value]", NO_STR "Affinity constraint\n" "Exclude any matching link\n" diff --git a/pathd/path_pcep_pcc.c b/pathd/path_pcep_pcc.c index 9af2148819..779c400b86 100644 --- a/pathd/path_pcep_pcc.c +++ b/pathd/path_pcep_pcc.c @@ -1273,7 +1273,8 @@ void handle_pcep_comp_reply(struct ctrl_state *ctrl_state, * pathd API is thread safe, we could get a new path */ if (pcc_state->caps.is_stateful) { PCEP_DEBUG("%s Delegating undefined dynamic path %s to PCE %s", - pcc_state->tag, path->name, pcc_state->originator); + pcc_state->tag, req->path->name, + pcc_state->originator); path = pcep_copy_path(req->path); path->is_delegated = true; send_report(pcc_state, path); diff --git a/pathd/pathd.c b/pathd/pathd.c index 2462b08306..9dc3a41638 100644 --- a/pathd/pathd.c +++ b/pathd/pathd.c @@ -195,14 +195,16 @@ int srte_segment_entry_set_nai(struct srte_segment_entry *segment, struct ipaddr *remote_ip, uint32_t remote_iface, uint8_t algo, uint8_t pref_len) { + int32_t status = 0; struct prefix pre = {0}; - segment->nai_type = type; - memcpy(&segment->nai_local_addr, local_ip, sizeof(struct ipaddr)); if (!segment || !local_ip || !remote_ip) return 1; + segment->nai_type = type; + memcpy(&segment->nai_local_addr, local_ip, sizeof(struct ipaddr)); + switch (type) { case SRTE_SEGMENT_NAI_TYPE_IPV4_NODE: case SRTE_SEGMENT_NAI_TYPE_IPV6_NODE: |
