+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright (C) 2020 NetDEF, Inc.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program 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 General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; see the file COPYING; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <zebra.h>
#include "pathd/path_pcep.h"
#include "pathd/path_pcep_config.h"
#include "pathd/path_pcep_debug.h"
-#include "thread.h"
+#include "frrevent.h"
#define MAX_XPATH 256
#define MAX_FLOAT_LEN 22
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;
return ERROR_19_9;
}
zlog_warn(
- "(%s)PCE tried to REMOVE found canidate!, let's remove",
+ "(%s)PCE tried to REMOVE found candidate!, let's remove",
__func__);
candidate->policy->srp_id = path->srp_id;
SET_FLAG(candidate->policy->flags, F_POLICY_DELETED);
}
if (number_of_sid_clashed)
- SET_FLAG(segment->segment_list->flags,
- F_SEGMENT_LIST_SID_CONFLICT);
+ SET_FLAG(segment_list->flags, F_SEGMENT_LIST_SID_CONFLICT);
else
srte_apply_changes();
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)
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");
}