+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* IS-IS Rout(e)ing protocol - isis_spf.c
* The SPT algorithm
* Tampere University of Technology
* Institute of Communications Engineering
* Copyright (C) 2017 Christian Franke <chris@opensourcerouting.org>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public Licenseas 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>
vertex->N.ip.priority = priority;
if (vertex->depth == 1 || listcount(vertex->Adj_N) > 0) {
struct isis_spftree *pre_spftree;
- struct route_table *route_table;
- bool allow_ecmp;
+ struct route_table *route_table = NULL;
+ bool allow_ecmp = false;
switch (spftree->type) {
case SPF_TYPE_RLFA:
return;
}
break;
- default:
+ case SPF_TYPE_FORWARD:
+ case SPF_TYPE_REVERSE:
break;
}
pre_spftree->lfa.protection_counters
.tilfa[vertex->N.ip.priority] += 1;
break;
- default:
+ case SPF_TYPE_FORWARD:
+ case SPF_TYPE_REVERSE:
route_table = spftree->route_table;
allow_ecmp = true;
VTYPE_IPREACH_TE))
continue;
break;
- default:
+ case VTYPE_PSEUDO_IS:
+ case VTYPE_PSEUDO_TE_IS:
+ case VTYPE_NONPSEUDO_IS:
+ case VTYPE_NONPSEUDO_TE_IS:
+ case VTYPE_ES:
+ case VTYPE_IPREACH_TE:
+ case VTYPE_IP6REACH_INTERNAL:
+ case VTYPE_IP6REACH_EXTERNAL:
break;
}
label2str(
nexthop->label_stack->label[i],
- buf_label, sizeof(buf_label));
+ 0, buf_label,
+ sizeof(buf_label));
if (i != 0)
strlcat(buf_labels, "/",
sizeof(buf_labels));
sizeof(buf_labels));
}
} else if (nexthop->sr.present)
- label2str(nexthop->sr.label, buf_labels,
+ label2str(nexthop->sr.label, 0, buf_labels,
sizeof(buf_labels));
else
strlcpy(buf_labels, "-", sizeof(buf_labels));