summaryrefslogtreecommitdiff
path: root/pathd/path_pcep_config.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2023-01-30 10:08:25 -0500
committerDonald Sharp <sharpd@nvidia.com>2023-01-31 15:15:42 -0500
commitd5dea3506e4bb55ebea5a225c70e24e8d6c800ac (patch)
tree0692150aabb29769357007ac2a095808c52e0952 /pathd/path_pcep_config.c
parentda21ae9dc78ad3b7681047f5783e83af9a0242b3 (diff)
pathd: Add missing enum's to switch statement
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'pathd/path_pcep_config.c')
-rw-r--r--pathd/path_pcep_config.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/pathd/path_pcep_config.c b/pathd/path_pcep_config.c
index 873b0ccd37..e2feabb036 100644
--- a/pathd/path_pcep_config.c
+++ b/pathd/path_pcep_config.c
@@ -270,7 +270,8 @@ path_pcep_config_list_path_hops(struct srte_segment_list *segment_list)
sizeof(struct ipaddr));
hop->nai.remote_iface = segment->nai_remote_iface;
break;
- default:
+ case SRTE_SEGMENT_NAI_TYPE_NONE:
+ case SRTE_SEGMENT_NAI_TYPE_IPV6_ADJACENCY_LINK_LOCAL_ADDRESSES:
break;
}
last_hop = hop;
@@ -489,9 +490,12 @@ status_int_to_ext(enum srte_policy_status status)
return PCEP_LSP_OPERATIONAL_GOING_UP;
case SRTE_POLICY_STATUS_GOING_DOWN:
return PCEP_LSP_OPERATIONAL_GOING_DOWN;
- default:
+ case SRTE_POLICY_STATUS_DOWN:
+ case SRTE_POLICY_STATUS_UNKNOWN:
return PCEP_LSP_OPERATIONAL_DOWN;
}
+
+ assert(!"Reached end of function where we are not expecting to");
}
enum pcep_sr_subobj_nai pcep_nai_type(enum srte_segment_nai_type type)
@@ -539,7 +543,10 @@ enum srte_segment_nai_type srte_nai_type(enum pcep_sr_subobj_nai type)
return SRTE_SEGMENT_NAI_TYPE_IPV6_ADJACENCY;
case PCEP_SR_SUBOBJ_NAI_UNNUMBERED_IPV4_ADJACENCY:
return SRTE_SEGMENT_NAI_TYPE_IPV4_UNNUMBERED_ADJACENCY;
- default:
+ case PCEP_SR_SUBOBJ_NAI_LINK_LOCAL_IPV6_ADJACENCY:
+ case PCEP_SR_SUBOBJ_NAI_UNKNOWN:
return SRTE_SEGMENT_NAI_TYPE_NONE;
}
+
+ assert(!"Reached end of function where we were not expecting to");
}