]> git.proxmox.com Git - mirror_frr.git/blobdiff - pceplib/pcep_session_logic_states.c
mgmtd: lib: cleanup error and debug messages
[mirror_frr.git] / pceplib / pcep_session_logic_states.c
index 3beceefad080c82122b8cd0585d863c54f158246..269145216efe4eb66119949f50d827677f0a58df 100644 (file)
@@ -1,25 +1,17 @@
+// SPDX-License-Identifier: LGPL-2.1-or-later
 /*
  * This file is part of the PCEPlib, a PCEP protocol library.
  *
  * Copyright (C) 2020 Volta Networks https://voltanet.io/
  *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program.  If not, see <https://www.gnu.org/licenses/>.
- *
  * Author : Brady Johnson <brady@voltanet.io>
  *
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <pthread.h>
 #include <stdbool.h>
 #include <stdio.h>
@@ -238,7 +230,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,
@@ -891,7 +898,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]",
@@ -1116,7 +1123,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,