2 * IS-IS Rout(e)ing protocol - isis_route.c
3 * Copyright (C) 2001,2002 Sampo Saaristo
4 * Tampere University of Technology
5 * Institute of Communications Engineering
7 * based on ../ospf6d/ospf6_route.[ch]
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public Licenseas published by the Free
12 * Software Foundation; either version 2 of the License, or (at your option)
15 * This program is distributed in the hope that it will be useful,but WITHOUT
16 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
17 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
20 * You should have received a copy of the GNU General Public License along
21 * with this program; see the file COPYING; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
31 #include "lib_errors.h"
37 #include "srcdest_table.h"
39 #include "isis_constants.h"
40 #include "isis_common.h"
41 #include "isis_flags.h"
43 #include "isis_misc.h"
44 #include "isis_adjacency.h"
45 #include "isis_circuit.h"
49 #include "isis_spf_private.h"
50 #include "isis_route.h"
51 #include "isis_zebra.h"
53 DEFINE_MTYPE_STATIC(ISISD
, ISIS_NEXTHOP
, "ISIS nexthop");
54 DEFINE_MTYPE_STATIC(ISISD
, ISIS_ROUTE_INFO
, "ISIS route info");
56 DEFINE_HOOK(isis_route_update_hook
,
57 (struct isis_area
* area
, struct prefix
*prefix
,
58 struct isis_route_info
*route_info
),
59 (area
, prefix
, route_info
));
61 static struct isis_nexthop
*nexthoplookup(struct list
*nexthops
, int family
,
62 union g_addr
*ip
, ifindex_t ifindex
);
63 static void isis_route_update(struct isis_area
*area
, struct prefix
*prefix
,
64 struct prefix_ipv6
*src_p
,
65 struct isis_route_info
*route_info
);
67 static struct isis_nexthop
*isis_nexthop_create(int family
, union g_addr
*ip
,
70 struct isis_nexthop
*nexthop
;
72 nexthop
= XCALLOC(MTYPE_ISIS_NEXTHOP
, sizeof(struct isis_nexthop
));
74 nexthop
->family
= family
;
75 nexthop
->ifindex
= ifindex
;
81 void isis_nexthop_delete(struct isis_nexthop
*nexthop
)
83 XFREE(MTYPE_ISIS_NEXTHOP_LABELS
, nexthop
->label_stack
);
84 XFREE(MTYPE_ISIS_NEXTHOP
, nexthop
);
87 static struct isis_nexthop
*nexthoplookup(struct list
*nexthops
, int family
,
88 union g_addr
*ip
, ifindex_t ifindex
)
90 struct listnode
*node
;
91 struct isis_nexthop
*nh
;
93 for (ALL_LIST_ELEMENTS_RO(nexthops
, node
, nh
)) {
94 if (nh
->ifindex
!= ifindex
)
97 /* if the IP is unspecified, return the first nexthop found on
102 if (nh
->family
!= family
)
107 if (IPV4_ADDR_CMP(&nh
->ip
.ipv4
, &ip
->ipv4
))
111 if (IPV6_ADDR_CMP(&nh
->ip
.ipv6
, &ip
->ipv6
))
115 flog_err(EC_LIB_DEVELOPMENT
,
116 "%s: unknown address family [%d]", __func__
,
127 void adjinfo2nexthop(int family
, struct list
*nexthops
,
128 struct isis_adjacency
*adj
, struct isis_sr_psid_info
*sr
,
129 struct mpls_label_stack
*label_stack
)
131 struct isis_nexthop
*nh
;
132 union g_addr ip
= {};
136 for (unsigned int i
= 0; i
< adj
->ipv4_address_count
; i
++) {
137 ip
.ipv4
= adj
->ipv4_addresses
[i
];
139 if (!nexthoplookup(nexthops
, AF_INET
, &ip
,
140 adj
->circuit
->interface
->ifindex
)) {
141 nh
= isis_nexthop_create(
143 adj
->circuit
->interface
->ifindex
);
144 memcpy(nh
->sysid
, adj
->sysid
, sizeof(nh
->sysid
));
147 nh
->label_stack
= label_stack
;
148 listnode_add(nexthops
, nh
);
154 for (unsigned int i
= 0; i
< adj
->ll_ipv6_count
; i
++) {
155 ip
.ipv6
= adj
->ll_ipv6_addrs
[i
];
157 if (!nexthoplookup(nexthops
, AF_INET6
, &ip
,
158 adj
->circuit
->interface
->ifindex
)) {
159 nh
= isis_nexthop_create(
161 adj
->circuit
->interface
->ifindex
);
162 memcpy(nh
->sysid
, adj
->sysid
, sizeof(nh
->sysid
));
165 nh
->label_stack
= label_stack
;
166 listnode_add(nexthops
, nh
);
172 flog_err(EC_LIB_DEVELOPMENT
, "%s: unknown address family [%d]",
178 static void isis_route_add_dummy_nexthops(struct isis_route_info
*rinfo
,
179 const uint8_t *sysid
,
180 struct isis_sr_psid_info
*sr
,
181 struct mpls_label_stack
*label_stack
)
183 struct isis_nexthop
*nh
;
185 nh
= XCALLOC(MTYPE_ISIS_NEXTHOP
, sizeof(struct isis_nexthop
));
186 memcpy(nh
->sysid
, sysid
, sizeof(nh
->sysid
));
188 nh
->label_stack
= label_stack
;
189 listnode_add(rinfo
->nexthops
, nh
);
192 static struct isis_route_info
*
193 isis_route_info_new(struct prefix
*prefix
, struct prefix_ipv6
*src_p
,
194 uint32_t cost
, uint32_t depth
, struct isis_sr_psid_info
*sr
,
195 struct list
*adjacencies
, bool allow_ecmp
)
197 struct isis_route_info
*rinfo
;
198 struct isis_vertex_adj
*vadj
;
199 struct listnode
*node
;
201 rinfo
= XCALLOC(MTYPE_ISIS_ROUTE_INFO
, sizeof(struct isis_route_info
));
203 rinfo
->nexthops
= list_new();
204 for (ALL_LIST_ELEMENTS_RO(adjacencies
, node
, vadj
)) {
205 struct isis_spf_adj
*sadj
= vadj
->sadj
;
206 struct isis_adjacency
*adj
= sadj
->adj
;
207 struct isis_sr_psid_info
*sr
= &vadj
->sr
;
208 struct mpls_label_stack
*label_stack
= vadj
->label_stack
;
211 * Create dummy nexthops when running SPF on a testing
214 if (CHECK_FLAG(im
->options
, F_ISIS_UNIT_TEST
)) {
215 isis_route_add_dummy_nexthops(rinfo
, sadj
->id
, sr
,
222 /* check for force resync this route */
223 if (CHECK_FLAG(adj
->circuit
->flags
,
224 ISIS_CIRCUIT_FLAPPED_AFTER_SPF
))
225 SET_FLAG(rinfo
->flag
, ISIS_ROUTE_FLAG_ZEBRA_RESYNC
);
227 /* update neighbor router address */
228 switch (prefix
->family
) {
230 if (depth
== 2 && prefix
->prefixlen
== IPV4_MAX_BITLEN
)
231 adj
->router_address
= prefix
->u
.prefix4
;
234 if (depth
== 2 && prefix
->prefixlen
== IPV6_MAX_BITLEN
235 && (!src_p
|| !src_p
->prefixlen
)) {
236 adj
->router_address6
= prefix
->u
.prefix6
;
240 flog_err(EC_LIB_DEVELOPMENT
,
241 "%s: unknown address family [%d]", __func__
,
245 adjinfo2nexthop(prefix
->family
, rinfo
->nexthops
, adj
, sr
,
252 rinfo
->depth
= depth
;
258 static void isis_route_info_delete(struct isis_route_info
*route_info
)
260 if (route_info
->nexthops
) {
261 route_info
->nexthops
->del
=
262 (void (*)(void *))isis_nexthop_delete
;
263 list_delete(&route_info
->nexthops
);
266 XFREE(MTYPE_ISIS_ROUTE_INFO
, route_info
);
269 void isis_route_node_cleanup(struct route_table
*table
, struct route_node
*node
)
272 isis_route_info_delete(node
->info
);
275 static bool isis_sr_psid_info_same(struct isis_sr_psid_info
*new,
276 struct isis_sr_psid_info
*old
)
278 if (new->present
!= old
->present
)
281 if (new->label
!= old
->label
)
284 if (new->sid
.flags
!= old
->sid
.flags
285 || new->sid
.value
!= old
->sid
.value
)
291 static bool isis_label_stack_same(struct mpls_label_stack
*new,
292 struct mpls_label_stack
*old
)
298 if (new->num_labels
!= old
->num_labels
)
300 if (memcmp(&new->label
, &old
->label
,
301 sizeof(mpls_label_t
) * new->num_labels
))
307 static int isis_route_info_same(struct isis_route_info
*new,
308 struct isis_route_info
*old
, char *buf
,
311 struct listnode
*node
;
312 struct isis_nexthop
*new_nh
, *old_nh
;
314 if (new->cost
!= old
->cost
) {
316 snprintf(buf
, buf_size
, "cost (old: %u, new: %u)",
317 old
->cost
, new->cost
);
321 if (new->depth
!= old
->depth
) {
323 snprintf(buf
, buf_size
, "depth (old: %u, new: %u)",
324 old
->depth
, new->depth
);
328 if (!isis_sr_psid_info_same(&new->sr
, &old
->sr
)) {
330 snprintf(buf
, buf_size
, "SR input label");
334 if (new->nexthops
->count
!= old
->nexthops
->count
) {
336 snprintf(buf
, buf_size
, "nhops num (old: %u, new: %u)",
337 old
->nexthops
->count
, new->nexthops
->count
);
341 for (ALL_LIST_ELEMENTS_RO(new->nexthops
, node
, new_nh
)) {
342 old_nh
= nexthoplookup(old
->nexthops
, new_nh
->family
,
343 &new_nh
->ip
, new_nh
->ifindex
);
346 snprintf(buf
, buf_size
,
347 "new nhop"); /* TODO: print nhop */
350 if (!isis_sr_psid_info_same(&new_nh
->sr
, &old_nh
->sr
)) {
352 snprintf(buf
, buf_size
, "nhop SR label");
355 if (!isis_label_stack_same(new_nh
->label_stack
,
356 old_nh
->label_stack
)) {
358 snprintf(buf
, buf_size
, "nhop label stack");
363 /* only the resync flag needs to be checked */
364 if (CHECK_FLAG(new->flag
, ISIS_ROUTE_FLAG_ZEBRA_RESYNC
)
365 != CHECK_FLAG(old
->flag
, ISIS_ROUTE_FLAG_ZEBRA_RESYNC
)) {
367 snprintf(buf
, buf_size
, "resync flag");
374 struct isis_route_info
*
375 isis_route_create(struct prefix
*prefix
, struct prefix_ipv6
*src_p
,
376 uint32_t cost
, uint32_t depth
, struct isis_sr_psid_info
*sr
,
377 struct list
*adjacencies
, bool allow_ecmp
,
378 struct isis_area
*area
, struct route_table
*table
)
380 struct route_node
*route_node
;
381 struct isis_route_info
*rinfo_new
, *rinfo_old
, *route_info
= NULL
;
387 rinfo_new
= isis_route_info_new(prefix
, src_p
, cost
, depth
, sr
,
388 adjacencies
, allow_ecmp
);
389 route_node
= srcdest_rnode_get(table
, prefix
, src_p
);
391 rinfo_old
= route_node
->info
;
393 if (IS_DEBUG_RTE_EVENTS
)
394 zlog_debug("ISIS-Rte (%s) route created: %pFX",
395 area
->area_tag
, prefix
);
396 route_info
= rinfo_new
;
397 UNSET_FLAG(route_info
->flag
, ISIS_ROUTE_FLAG_ZEBRA_SYNCED
);
399 route_unlock_node(route_node
);
401 if (IS_DEBUG_RTE_EVENTS
)
402 zlog_debug("ISIS-Rte (%s) route already exists: %pFX",
403 area
->area_tag
, prefix
);
404 #endif /* EXTREME_DEBUG */
405 if (isis_route_info_same(rinfo_new
, rinfo_old
, change_buf
,
406 sizeof(change_buf
))) {
408 if (IS_DEBUG_RTE_EVENTS
)
410 "ISIS-Rte (%s) route unchanged: %pFX",
411 area
->area_tag
, prefix
);
412 #endif /* EXTREME_DEBUG */
413 isis_route_info_delete(rinfo_new
);
414 route_info
= rinfo_old
;
416 if (IS_DEBUG_RTE_EVENTS
)
418 "ISIS-Rte (%s): route changed: %pFX, change: %s",
419 area
->area_tag
, prefix
, change_buf
);
420 rinfo_new
->sr_previous
= rinfo_old
->sr
;
421 isis_route_info_delete(rinfo_old
);
422 route_info
= rinfo_new
;
423 UNSET_FLAG(route_info
->flag
,
424 ISIS_ROUTE_FLAG_ZEBRA_SYNCED
);
428 SET_FLAG(route_info
->flag
, ISIS_ROUTE_FLAG_ACTIVE
);
429 route_node
->info
= route_info
;
434 void isis_route_delete(struct isis_area
*area
, struct route_node
*rode
,
435 struct route_table
*table
)
437 struct isis_route_info
*rinfo
;
438 char buff
[SRCDEST2STR_BUFFER
];
439 struct prefix
*prefix
;
440 struct prefix_ipv6
*src_p
;
443 srcdest_rnode2str(rode
, buff
, sizeof(buff
));
445 srcdest_rnode_prefixes(rode
, (const struct prefix
**)&prefix
,
446 (const struct prefix
**)&src_p
);
450 if (IS_DEBUG_RTE_EVENTS
)
452 "ISIS-Rte: tried to delete non-existent route %s",
457 if (CHECK_FLAG(rinfo
->flag
, ISIS_ROUTE_FLAG_ZEBRA_SYNCED
)) {
458 UNSET_FLAG(rinfo
->flag
, ISIS_ROUTE_FLAG_ACTIVE
);
459 if (IS_DEBUG_RTE_EVENTS
)
460 zlog_debug("ISIS-Rte: route delete %s", buff
);
461 isis_route_update(area
, prefix
, src_p
, rinfo
);
463 isis_route_info_delete(rinfo
);
465 route_unlock_node(rode
);
468 static void isis_route_remove_previous_sid(struct isis_area
*area
,
469 struct prefix
*prefix
,
470 struct isis_route_info
*route_info
)
473 * Explicitly uninstall previous Prefix-SID label if it has
474 * changed or was removed.
476 if (route_info
->sr_previous
.present
&&
477 (!route_info
->sr
.present
||
478 route_info
->sr_previous
.label
!= route_info
->sr
.label
))
479 isis_zebra_prefix_sid_uninstall(area
, prefix
, route_info
,
480 &route_info
->sr_previous
);
483 static void isis_route_update(struct isis_area
*area
, struct prefix
*prefix
,
484 struct prefix_ipv6
*src_p
,
485 struct isis_route_info
*route_info
)
487 if (CHECK_FLAG(route_info
->flag
, ISIS_ROUTE_FLAG_ACTIVE
)) {
488 if (CHECK_FLAG(route_info
->flag
, ISIS_ROUTE_FLAG_ZEBRA_SYNCED
))
491 isis_route_remove_previous_sid(area
, prefix
, route_info
);
494 isis_zebra_route_add_route(area
->isis
, prefix
, src_p
,
496 /* Install/reinstall Prefix-SID label. */
497 if (route_info
->sr
.present
)
498 isis_zebra_prefix_sid_install(area
, prefix
, route_info
,
500 hook_call(isis_route_update_hook
, area
, prefix
, route_info
);
502 SET_FLAG(route_info
->flag
, ISIS_ROUTE_FLAG_ZEBRA_SYNCED
);
503 UNSET_FLAG(route_info
->flag
, ISIS_ROUTE_FLAG_ZEBRA_RESYNC
);
505 /* Uninstall Prefix-SID label. */
506 if (route_info
->sr
.present
)
507 isis_zebra_prefix_sid_uninstall(
508 area
, prefix
, route_info
, &route_info
->sr
);
509 /* Uninstall route. */
510 isis_zebra_route_del_route(area
->isis
, prefix
, src_p
,
512 hook_call(isis_route_update_hook
, area
, prefix
, route_info
);
514 UNSET_FLAG(route_info
->flag
, ISIS_ROUTE_FLAG_ZEBRA_SYNCED
);
518 static void _isis_route_verify_table(struct isis_area
*area
,
519 struct route_table
*table
,
520 struct route_table
*table_backup
,
521 struct route_table
**tables
)
523 struct route_node
*rnode
, *drnode
;
524 struct isis_route_info
*rinfo
;
526 char buff
[SRCDEST2STR_BUFFER
];
527 #endif /* EXTREME_DEBUG */
529 for (rnode
= route_top(table
); rnode
;
530 rnode
= srcdest_route_next(rnode
)) {
531 if (rnode
->info
== NULL
)
535 struct prefix
*dst_p
;
536 struct prefix_ipv6
*src_p
;
538 srcdest_rnode_prefixes(rnode
,
539 (const struct prefix
**)&dst_p
,
540 (const struct prefix
**)&src_p
);
542 /* Link primary route to backup route. */
544 struct route_node
*rnode_bck
;
546 rnode_bck
= srcdest_rnode_lookup(table_backup
, dst_p
,
549 rinfo
->backup
= rnode_bck
->info
;
550 UNSET_FLAG(rinfo
->flag
,
551 ISIS_ROUTE_FLAG_ZEBRA_SYNCED
);
552 } else if (rinfo
->backup
) {
553 rinfo
->backup
= NULL
;
554 UNSET_FLAG(rinfo
->flag
,
555 ISIS_ROUTE_FLAG_ZEBRA_SYNCED
);
560 if (IS_DEBUG_RTE_EVENTS
) {
561 srcdest2str(dst_p
, src_p
, buff
, sizeof(buff
));
563 "ISIS-Rte (%s): route validate: %s %s %s %s",
565 (CHECK_FLAG(rinfo
->flag
,
566 ISIS_ROUTE_FLAG_ZEBRA_SYNCED
)
569 (CHECK_FLAG(rinfo
->flag
,
570 ISIS_ROUTE_FLAG_ZEBRA_RESYNC
)
573 (CHECK_FLAG(rinfo
->flag
, ISIS_ROUTE_FLAG_ACTIVE
)
578 #endif /* EXTREME_DEBUG */
580 isis_route_update(area
, dst_p
, src_p
, rinfo
);
582 if (CHECK_FLAG(rinfo
->flag
, ISIS_ROUTE_FLAG_ACTIVE
))
585 /* Area is either L1 or L2 => we use level route tables
587 * validating => no problems with deleting routes. */
589 isis_route_delete(area
, rnode
, table
);
593 /* If area is L1L2, we work with merge table and
595 * delete node from level tables as well before deleting
597 for (int level
= ISIS_LEVEL1
; level
<= ISIS_LEVEL2
; level
++) {
598 drnode
= srcdest_rnode_lookup(tables
[level
- 1],
603 route_unlock_node(drnode
);
605 if (drnode
->info
!= rnode
->info
)
609 route_unlock_node(drnode
);
612 isis_route_delete(area
, rnode
, table
);
616 void isis_route_verify_table(struct isis_area
*area
, struct route_table
*table
,
617 struct route_table
*table_backup
)
619 _isis_route_verify_table(area
, table
, table_backup
, NULL
);
622 /* Function to validate route tables for L1L2 areas. In this case we can't use
623 * level route tables directly, we have to merge them at first. L1 routes are
624 * preferred over the L2 ones.
626 * Merge algorithm is trivial (at least for now). All L1 paths are copied into
627 * merge table at first, then L2 paths are added if L1 path for same prefix
628 * doesn't already exists there.
630 * FIXME: Is it right place to do it at all? Maybe we should push both levels
631 * to the RIB with different zebra route types and let RIB handle this? */
632 void isis_route_verify_merge(struct isis_area
*area
,
633 struct route_table
*level1_table
,
634 struct route_table
*level1_table_backup
,
635 struct route_table
*level2_table
,
636 struct route_table
*level2_table_backup
)
638 struct route_table
*tables
[] = {level1_table
, level2_table
};
639 struct route_table
*tables_backup
[] = {level1_table_backup
,
640 level2_table_backup
};
641 struct route_table
*merge
;
642 struct route_node
*rnode
, *mrnode
;
644 merge
= srcdest_table_init();
646 for (int level
= ISIS_LEVEL1
; level
<= ISIS_LEVEL2
; level
++) {
647 for (rnode
= route_top(tables
[level
- 1]); rnode
;
648 rnode
= srcdest_route_next(rnode
)) {
649 struct isis_route_info
*rinfo
= rnode
->info
;
650 struct route_node
*rnode_bck
;
655 struct prefix
*prefix
;
656 struct prefix_ipv6
*src_p
;
658 srcdest_rnode_prefixes(rnode
,
659 (const struct prefix
**)&prefix
,
660 (const struct prefix
**)&src_p
);
662 /* Link primary route to backup route. */
663 rnode_bck
= srcdest_rnode_lookup(
664 tables_backup
[level
- 1], prefix
, src_p
);
666 rinfo
->backup
= rnode_bck
->info
;
667 UNSET_FLAG(rinfo
->flag
,
668 ISIS_ROUTE_FLAG_ZEBRA_SYNCED
);
669 } else if (rinfo
->backup
) {
670 rinfo
->backup
= NULL
;
671 UNSET_FLAG(rinfo
->flag
,
672 ISIS_ROUTE_FLAG_ZEBRA_SYNCED
);
675 mrnode
= srcdest_rnode_get(merge
, prefix
, src_p
);
676 struct isis_route_info
*mrinfo
= mrnode
->info
;
678 route_unlock_node(mrnode
);
679 if (CHECK_FLAG(mrinfo
->flag
,
680 ISIS_ROUTE_FLAG_ACTIVE
)) {
681 /* Clear the ZEBRA_SYNCED flag on the
682 * L2 route when L1 wins, otherwise L2
683 * won't get reinstalled when L1
688 ISIS_ROUTE_FLAG_ZEBRA_SYNCED
691 } else if (CHECK_FLAG(rinfo
->flag
,
692 ISIS_ROUTE_FLAG_ACTIVE
)) {
693 /* Clear the ZEBRA_SYNCED flag on the L1
694 * route when L2 wins, otherwise L1
695 * won't get reinstalled when it
700 ISIS_ROUTE_FLAG_ZEBRA_SYNCED
705 ISIS_ROUTE_FLAG_ZEBRA_SYNCED
)) {
709 mrnode
->info
= rnode
->info
;
713 _isis_route_verify_table(area
, merge
, NULL
, tables
);
714 route_table_finish(merge
);
717 void isis_route_invalidate_table(struct isis_area
*area
,
718 struct route_table
*table
)
720 struct route_node
*rode
;
721 struct isis_route_info
*rinfo
;
722 for (rode
= route_top(table
); rode
; rode
= srcdest_route_next(rode
)) {
723 if (rode
->info
== NULL
)
728 rinfo
->backup
= NULL
;
730 * For now, always force routes that have backup
731 * nexthops to be reinstalled.
733 UNSET_FLAG(rinfo
->flag
, ISIS_ROUTE_FLAG_ZEBRA_SYNCED
);
735 UNSET_FLAG(rinfo
->flag
, ISIS_ROUTE_FLAG_ACTIVE
);
739 void isis_route_switchover_nexthop(struct isis_area
*area
,
740 struct route_table
*table
, int family
,
741 union g_addr
*nexthop_addr
,
744 const char *ifname
= NULL
, *vrfname
= NULL
;
745 struct isis_route_info
*rinfo
;
746 struct prefix_ipv6
*src_p
;
747 struct route_node
*rnode
;
749 struct prefix
*prefix
;
751 if (IS_DEBUG_EVENTS
) {
752 if (area
&& area
->isis
) {
753 vrf_id
= area
->isis
->vrf_id
;
754 vrfname
= vrf_id_to_name(vrf_id
);
755 ifname
= ifindex2ifname(ifindex
, vrf_id
);
757 zlog_debug("%s: initiating fast-reroute %s on VRF %s iface %s",
758 __func__
, family2str(family
), vrfname
? vrfname
: "",
759 ifname
? ifname
: "");
762 for (rnode
= route_top(table
); rnode
;
763 rnode
= srcdest_route_next(rnode
)) {
771 if (!nexthoplookup(rinfo
->nexthops
, family
, nexthop_addr
,
775 srcdest_rnode_prefixes(rnode
, (const struct prefix
**)&prefix
,
776 (const struct prefix
**)&src_p
);
778 /* Switchover route. */
779 isis_route_remove_previous_sid(area
, prefix
, rinfo
);
780 UNSET_FLAG(rinfo
->flag
, ISIS_ROUTE_FLAG_ZEBRA_SYNCED
);
781 isis_route_update(area
, prefix
, src_p
, rinfo
->backup
);
783 isis_route_info_delete(rinfo
);
786 route_unlock_node(rnode
);