summaryrefslogtreecommitdiffstats
path: root/pceplib
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2023-01-30 16:11:32 +0100
committerDonald Sharp <sharpd@nvidia.com>2023-01-31 21:15:59 +0100
commitfdfa6ecfad4ca9f7cfa67edce3b3e4a8bd0ed154 (patch)
tree63a54752e247ec6573636c8d64de41af64a2606a /pceplib
parentripngd: Add missing enums to switch statement (diff)
downloadfrr-fdfa6ecfad4ca9f7cfa67edce3b3e4a8bd0ed154.tar.xz
frr-fdfa6ecfad4ca9f7cfa67edce3b3e4a8bd0ed154.zip
pceplib: Add missing enum's to switch statement
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'pceplib')
-rw-r--r--pceplib/pcep_msg_objects_encoding.c7
-rw-r--r--pceplib/pcep_msg_tools.c40
-rw-r--r--pceplib/pcep_session_logic_states.c22
3 files changed, 61 insertions, 8 deletions
diff --git a/pceplib/pcep_msg_objects_encoding.c b/pceplib/pcep_msg_objects_encoding.c
index 75eb112e2..560060436 100644
--- a/pceplib/pcep_msg_objects_encoding.c
+++ b/pceplib/pcep_msg_objects_encoding.c
@@ -923,12 +923,13 @@ uint16_t pcep_encode_obj_ro(struct pcep_object_header *hdr,
index += LENGTH_10WORDS;
break;
- default:
+ case PCEP_SR_SUBOBJ_NAI_ABSENT:
+ case PCEP_SR_SUBOBJ_NAI_UNKNOWN:
break;
}
} break;
- default:
+ case RO_SUBOBJ_UNKNOWN:
break;
}
}
@@ -1712,7 +1713,7 @@ struct pcep_object_header *pcep_decode_obj_ro(struct pcep_object_header *hdr,
} break;
case PCEP_SR_SUBOBJ_NAI_ABSENT:
- default:
+ case PCEP_SR_SUBOBJ_NAI_UNKNOWN:
break;
}
} break;
diff --git a/pceplib/pcep_msg_tools.c b/pceplib/pcep_msg_tools.c
index f7c25f447..ca6a3ab0c 100644
--- a/pceplib/pcep_msg_tools.c
+++ b/pceplib/pcep_msg_tools.c
@@ -313,7 +313,25 @@ void pcep_obj_free_tlv(struct pcep_object_tlv_header *tlv)
}
break;
- default:
+ case PCEP_OBJ_TLV_TYPE_NO_PATH_VECTOR:
+ case PCEP_OBJ_TLV_TYPE_OBJECTIVE_FUNCTION_LIST:
+ case PCEP_OBJ_TLV_TYPE_VENDOR_INFO:
+ case PCEP_OBJ_TLV_TYPE_STATEFUL_PCE_CAPABILITY:
+ case PCEP_OBJ_TLV_TYPE_SYMBOLIC_PATH_NAME:
+ case PCEP_OBJ_TLV_TYPE_IPV4_LSP_IDENTIFIERS:
+ case PCEP_OBJ_TLV_TYPE_IPV6_LSP_IDENTIFIERS:
+ case PCEP_OBJ_TLV_TYPE_LSP_ERROR_CODE:
+ case PCEP_OBJ_TLV_TYPE_RSVP_ERROR_SPEC:
+ case PCEP_OBJ_TLV_TYPE_LSP_DB_VERSION:
+ case PCEP_OBJ_TLV_TYPE_SR_PCE_CAPABILITY:
+ case PCEP_OBJ_TLV_TYPE_PATH_SETUP_TYPE:
+ case PCEP_OBJ_TLV_TYPE_SRPOLICY_POL_ID:
+ case PCEP_OBJ_TLV_TYPE_SRPOLICY_POL_NAME:
+ case PCEP_OBJ_TLV_TYPE_SRPOLICY_CPATH_ID:
+ case PCEP_OBJ_TLV_TYPE_SRPOLICY_CPATH_PREFERENCE:
+ case PCEP_OBJ_TLV_TYPE_UNKNOWN:
+ case PCEP_OBJ_TYPE_CISCO_BSID:
+ case PCEP_OBJ_TLV_TYPE_ARBITRARY:
break;
}
@@ -387,7 +405,25 @@ void pcep_obj_free_object(struct pcep_object_header *obj)
}
break;
- default:
+ case PCEP_OBJ_CLASS_OPEN:
+ case PCEP_OBJ_CLASS_RP:
+ case PCEP_OBJ_CLASS_NOPATH:
+ case PCEP_OBJ_CLASS_ENDPOINTS:
+ case PCEP_OBJ_CLASS_BANDWIDTH:
+ case PCEP_OBJ_CLASS_METRIC:
+ case PCEP_OBJ_CLASS_LSPA:
+ case PCEP_OBJ_CLASS_NOTF:
+ case PCEP_OBJ_CLASS_ERROR:
+ case PCEP_OBJ_CLASS_CLOSE:
+ case PCEP_OBJ_CLASS_OF:
+ case PCEP_OBJ_CLASS_LSP:
+ case PCEP_OBJ_CLASS_SRP:
+ case PCEP_OBJ_CLASS_VENDOR_INFO:
+ case PCEP_OBJ_CLASS_INTER_LAYER:
+ case PCEP_OBJ_CLASS_REQ_ADAP_CAP:
+ case PCEP_OBJ_CLASS_SERVER_IND:
+ case PCEP_OBJ_CLASS_ASSOCIATION:
+ case PCEP_OBJ_CLASS_MAX:
break;
}
diff --git a/pceplib/pcep_session_logic_states.c b/pceplib/pcep_session_logic_states.c
index 3e9c701a6..e7fbbb45e 100644
--- a/pceplib/pcep_session_logic_states.c
+++ b/pceplib/pcep_session_logic_states.c
@@ -242,7 +242,22 @@ bool verify_pcep_open_object(pcep_session *session,
case PCEP_OBJ_TLV_TYPE_SR_PCE_CAPABILITY:
break;
- default:
+ case PCEP_OBJ_TLV_TYPE_NO_PATH_VECTOR:
+ case PCEP_OBJ_TLV_TYPE_OBJECTIVE_FUNCTION_LIST:
+ case PCEP_OBJ_TLV_TYPE_VENDOR_INFO:
+ case PCEP_OBJ_TLV_TYPE_SYMBOLIC_PATH_NAME:
+ case PCEP_OBJ_TLV_TYPE_IPV4_LSP_IDENTIFIERS:
+ case PCEP_OBJ_TLV_TYPE_IPV6_LSP_IDENTIFIERS:
+ case PCEP_OBJ_TLV_TYPE_LSP_ERROR_CODE:
+ case PCEP_OBJ_TLV_TYPE_RSVP_ERROR_SPEC:
+ case PCEP_OBJ_TLV_TYPE_PATH_SETUP_TYPE:
+ case PCEP_OBJ_TLV_TYPE_SRPOLICY_POL_ID:
+ case PCEP_OBJ_TLV_TYPE_SRPOLICY_POL_NAME:
+ case PCEP_OBJ_TLV_TYPE_SRPOLICY_CPATH_ID:
+ case PCEP_OBJ_TLV_TYPE_SRPOLICY_CPATH_PREFERENCE:
+ case PCEP_OBJ_TLV_TYPE_UNKNOWN:
+ case PCEP_OBJ_TYPE_CISCO_BSID:
+ case PCEP_OBJ_TLV_TYPE_ARBITRARY:
/* TODO how to handle unrecognized TLV ?? */
pcep_log(
LOG_INFO,
@@ -895,7 +910,7 @@ void handle_timer_event(pcep_session_event *event)
case SESSION_STATE_INITIALIZED:
case SESSION_STATE_PCEP_CONNECTED:
- default:
+ case SESSION_STATE_UNKNOWN:
pcep_log(
LOG_INFO,
"%s: handle_timer_event unrecognized state transition, timer_id [%d] state [%d] session [%d]",
@@ -1120,7 +1135,8 @@ void handle_socket_comm_event(pcep_session_event *event)
message_enqueued = true;
break;
- default:
+ case PCEP_TYPE_START_TLS:
+ case PCEP_TYPE_MAX:
pcep_log(LOG_INFO, "%s: \t UnSupported message",
__func__);
send_pcep_error(session,