mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-09 05:13:07 +00:00
Merge pull request #8665 from volta-networks/fix_pathd_coverity
pathd: Clean coverity issues after merge pathd link state feature.
This commit is contained in:
commit
587a1dfa39
@ -351,8 +351,6 @@ static int segment_list_has_src_dst(
|
|||||||
nb_cli_enqueue_change(vty, xpath, NB_OP_MODIFY,
|
nb_cli_enqueue_change(vty, xpath, NB_OP_MODIFY,
|
||||||
"ipv6_adjacency");
|
"ipv6_adjacency");
|
||||||
node_src_id = adj_src_ipv6_str;
|
node_src_id = adj_src_ipv6_str;
|
||||||
} else {
|
|
||||||
return CMD_ERR_NO_MATCH;
|
|
||||||
}
|
}
|
||||||
/* addresses */
|
/* addresses */
|
||||||
snprintf(xpath, XPATH_MAXLEN, "./segment[index='%s']/nai/local-address",
|
snprintf(xpath, XPATH_MAXLEN, "./segment[index='%s']/nai/local-address",
|
||||||
@ -421,8 +419,6 @@ int segment_list_has_prefix(
|
|||||||
sizeof(buf_prefix));
|
sizeof(buf_prefix));
|
||||||
pre_ipaddr.ipa_type = IPADDR_V6;
|
pre_ipaddr.ipa_type = IPADDR_V6;
|
||||||
pre_ipaddr.ip._v6_addr = prefix_cli.u.prefix6;
|
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",
|
snprintf(xpath, XPATH_MAXLEN, "./segment[index='%s']/nai/local-address",
|
||||||
index_str);
|
index_str);
|
||||||
@ -524,7 +520,7 @@ DEFPY(srte_segment_list_segment, srte_segment_list_segment_cmd,
|
|||||||
if (status != CMD_SUCCESS)
|
if (status != CMD_SUCCESS)
|
||||||
return status;
|
return status;
|
||||||
} else {
|
} else {
|
||||||
segment_list_has_prefix(
|
status = segment_list_has_prefix(
|
||||||
vty, xpath, index, index_str, prefix_ipv4,
|
vty, xpath, index, index_str, prefix_ipv4,
|
||||||
prefix_ipv4_str, prefix_ipv6, prefix_ipv6_str, has_algo,
|
prefix_ipv4_str, prefix_ipv6, prefix_ipv6_str, has_algo,
|
||||||
algo, algo_str, has_iface_id, iface_id, iface_id_str);
|
algo, algo_str, has_iface_id, iface_id, iface_id_str);
|
||||||
|
@ -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 */
|
* pathd API is thread safe, we could get a new path */
|
||||||
if (pcc_state->caps.is_stateful) {
|
if (pcc_state->caps.is_stateful) {
|
||||||
PCEP_DEBUG("%s Delegating undefined dynamic path %s to PCE %s",
|
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 = pcep_copy_path(req->path);
|
||||||
path->is_delegated = true;
|
path->is_delegated = true;
|
||||||
send_report(pcc_state, path);
|
send_report(pcc_state, path);
|
||||||
|
@ -195,14 +195,16 @@ int srte_segment_entry_set_nai(struct srte_segment_entry *segment,
|
|||||||
struct ipaddr *remote_ip, uint32_t remote_iface,
|
struct ipaddr *remote_ip, uint32_t remote_iface,
|
||||||
uint8_t algo, uint8_t pref_len)
|
uint8_t algo, uint8_t pref_len)
|
||||||
{
|
{
|
||||||
|
|
||||||
int32_t status = 0;
|
int32_t status = 0;
|
||||||
struct prefix pre = {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)
|
if (!segment || !local_ip || !remote_ip)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
segment->nai_type = type;
|
||||||
|
memcpy(&segment->nai_local_addr, local_ip, sizeof(struct ipaddr));
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case SRTE_SEGMENT_NAI_TYPE_IPV4_NODE:
|
case SRTE_SEGMENT_NAI_TYPE_IPV4_NODE:
|
||||||
case SRTE_SEGMENT_NAI_TYPE_IPV6_NODE:
|
case SRTE_SEGMENT_NAI_TYPE_IPV6_NODE:
|
||||||
|
Loading…
Reference in New Issue
Block a user