+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* This is an implementation of Segment Routing for IS-IS as per RFC 8667
*
*
* Author: Olivier Dugeon <olivier.dugeon@orange.com>
* Contributor: Renato Westphal <renato@opensourcerouting.org> for NetDEF
- *
- * 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>
}
DEFUN(show_sr_node, show_sr_node_cmd,
- "show isis segment-routing node",
- SHOW_STR PROTO_HELP
+ "show " PROTO_NAME " segment-routing node",
+ SHOW_STR
+ PROTO_HELP
"Segment-Routing\n"
"Segment-Routing node\n")
{
for (ALL_LIST_ELEMENTS_RO(isis->area_list, node, area)) {
vty_out(vty, "Area %s:\n",
area->area_tag ? area->area_tag : "null");
-
+ if (!area->srdb.enabled) {
+ vty_out(vty, " Segment Routing is disabled\n");
+ continue;
+ }
for (int level = ISIS_LEVEL1; level <= ISIS_LEVELS;
level++)
show_node(vty, area, level);
area->area_tag);
/* Disable any re-attempt to connect to Label Manager */
- thread_cancel(&srdb->t_start_lm);
+ THREAD_OFF(srdb->t_start_lm);
/* Uninstall all local Adjacency-SIDs. */
for (ALL_LIST_ELEMENTS(area->srdb.adj_sids, node, nnode, sra))
if (area->srdb.enabled)
isis_sr_stop(area);
+ /* Free Adjacency SID list */
+ list_delete(&srdb->adj_sids);
+
/* Clear Prefix-SID configuration. */
while (srdb_prefix_cfg_count(&srdb->config.prefix_sids) > 0) {
struct sr_prefix_cfg *pcfg;