From 7569ae8bb7390224e16ee416cc0745d427a29818 Mon Sep 17 00:00:00 2001 From: Timo Teräs Date: Fri, 15 Jan 2016 17:36:31 +0200 Subject: zebra: support FIB override routes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit FIB override routes are for routing protocols that establish shortcut routes, or establish point-to-point routes that should not be redistributed. Namely this is useful NHRP daemon to come. Zebra is extended to select two entries from RIB the "best" entry from routing protocols, and the FIB entry to install to kernel. FIB override routes are never selected as best entry, and thus are never adverticed to other routing daemons. The best FIB override, or if it does not exist the otherwise best RIB is selected as FIB entry to be installed. Signed-off-by: Timo Teräs Acked-by: Donald Sharp [CF: Massage to fit cumulus tree] Signed-off-by: Christian Franke --- zebra/zebra_vty.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'zebra/zebra_vty.c') diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index e76e4ab8f..41e1293e7 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -2023,6 +2023,10 @@ vty_show_ip_route_detail (struct vty *vty, struct route_node *rn, int mcast) } if (CHECK_FLAG (rib->flags, ZEBRA_FLAG_SELECTED)) vty_out (vty, ", best"); + else if (CHECK_FLAG (rib->status, RIB_ENTRY_SELECTED_FIB)) + vty_out (vty, ", fib"); + if (CHECK_FLAG (rib->flags, ZEBRA_FLAG_FIB_OVERRIDE)) + vty_out (vty, ", fib-override"); if (rib->refcnt) vty_out (vty, ", refcnt %ld", rib->refcnt); if (CHECK_FLAG (rib->flags, ZEBRA_FLAG_BLACKHOLE)) @@ -2299,7 +2303,8 @@ vty_show_ip_route (struct vty *vty, struct route_node *rn, struct rib *rib, len += vty_out (vty, "[%d]", rib->instance); len += vty_out (vty, "%c%c %s", CHECK_FLAG (rib->flags, ZEBRA_FLAG_SELECTED) - ? '>' : ' ', + ? '>' : CHECK_FLAG (rib->status, RIB_ENTRY_SELECTED_FIB) + ? '!' : ' ', CHECK_FLAG (nexthop->flags, NEXTHOP_FLAG_FIB) ? '*' : ' ', prefix2str (&rn->p, buf, sizeof buf)); -- cgit v1.2.3