size_t affected_nhs = 0;
struct isis_vertex_adj *vadj;
+ /* Local routes don't need protection. */
+ if (VTYPE_IP(vertex->type) && vertex->depth == 1)
+ return false;
+
/* Only local adjacencies need Adj-SID protection. */
if (VTYPE_IS(vertex->type)
&& !isis_adj_find(spftree_pc->area, spftree_pc->level,
if (VTYPE_IP(vertex->type)
&& !CHECK_FLAG(spftree->flags, F_SPFTREE_NO_ROUTES)) {
- if (listcount(vertex->Adj_N) > 0) {
+ if (vertex->depth == 1 || listcount(vertex->Adj_N) > 0) {
struct route_table *route_table;
if (spftree->type == SPF_TYPE_TI_LFA) {
}
],
"10.0.20.0/24": [
- {
- "distance": 115,
- "metric": 20,
- "nexthops": [
- {
- "afi": "ipv4",
- "interfaceName": "r1-eth0",
- "ip": "10.0.20.1"
- }
- ],
- "prefix": "10.0.20.0/24",
- "protocol": "isis",
- "vrfName": "r1-cust1"
- },
{
"nexthops": [
{
}
],
"10.0.21.0/24": [
- {
- "distance": 115,
- "metric": 20,
- "nexthops": [
- {
- "afi": "ipv4",
- "interfaceName": "r2-eth0",
- "ip": "10.0.21.1"
- }
- ],
- "prefix": "10.0.21.0/24",
- "protocol": "isis",
- "vrfName": "r2-cust1"
- },
{
"nexthops": [
{
}
],
"10.0.20.0/24": [
- {
- "distance": 115,
- "metric": 20,
- "nexthops": [
- {
- "afi": "ipv4",
- "interfaceName": "r3-eth0",
- "ip": "10.0.20.2"
- }
- ],
- "prefix": "10.0.20.0/24",
- "protocol": "isis",
- "vrfName": "r3-cust1"
- },
{
"nexthops": [
{
}
],
"10.0.21.0/24": [
- {
- "nexthops": [
- {
- "afi": "ipv4",
- "interfaceName": "r4-eth0",
- "ip": "10.0.21.2"
- }
- ],
- "prefix": "10.0.21.0/24",
- "protocol": "isis",
- "vrfName": "r4-cust1"
- },
{
"nexthops": [
{
}
],
"10.0.20.0/24": [
- {
- "distance": 115,
- "metric": 10,
- "nexthops": [
- {
- "afi": "ipv4",
- "interfaceName": "r1-eth0",
- "ip": "10.0.20.1"
- }
- ],
- "prefix": "10.0.20.0/24",
- "protocol": "isis"
- },
{
"nexthops": [
{
}
],
"10.0.21.0/24": [
- {
- "distance": 115,
- "metric": 10,
- "nexthops": [
- {
- "afi": "ipv4",
- "interfaceName": "r2-eth0",
- "ip": "10.0.21.1"
- }
- ],
- "prefix": "10.0.21.0/24",
- "protocol": "isis"
- },
{
"nexthops": [
{
}
],
"10.0.20.0/24": [
- {
- "distance": 115,
- "metric": 10,
- "nexthops": [
- {
- "afi": "ipv4",
- "interfaceName": "r3-eth0",
- "ip": "10.0.20.2"
- }
- ],
- "prefix": "10.0.20.0/24",
- "protocol": "isis"
- },
{
"nexthops": [
{
}
],
"10.0.21.0/24": [
- {
- "distance": 115,
- "metric": 10,
- "nexthops": [
- {
- "afi": "ipv4",
- "interfaceName": "r4-eth0",
- "ip": "10.0.21.2"
- }
- ],
- "prefix": "10.0.21.0/24",
- "protocol": "isis"
- },
{
"nexthops": [
{