From: Donald Sharp Date: Mon, 26 Jun 2017 14:44:50 +0000 (-0400) Subject: zebra: Fix up default admin distance for some route types X-Git-Tag: frr-4.0-dev~292^2~1 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=c710b277cfde65fab8ae071fd80992e836bff7f2;p=mirror%2Ffrr.git zebra: Fix up default admin distance for some route types Set the default admin distance for some route types more appropriately. The route_distance function would return 0 for array items not configured, which is not the right thing to do. Signed-off-by: Donald Sharp Signed-off-by: Renato Westphal --- diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index c4c80b156b..e0c92801ce 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -78,7 +78,20 @@ static const struct { [ZEBRA_ROUTE_OSPF6] = {ZEBRA_ROUTE_OSPF6, 110}, [ZEBRA_ROUTE_ISIS] = {ZEBRA_ROUTE_ISIS, 115}, [ZEBRA_ROUTE_BGP] = {ZEBRA_ROUTE_BGP, 20 /* IBGP is 200. */}, + [ZEBRA_ROUTE_PIM] = {ZEBRA_ROUTE_PIM, 255}, + [ZEBRA_ROUTE_EIGRP] = {ZEBRA_ROUTE_EIGRP, 90}, [ZEBRA_ROUTE_NHRP] = {ZEBRA_ROUTE_NHRP, 10}, + [ZEBRA_ROUTE_HSLS] = {ZEBRA_ROUTE_HSLS, 255}, + [ZEBRA_ROUTE_OLSR] = {ZEBRA_ROUTE_OLSR, 255}, + [ZEBRA_ROUTE_TABLE] = {ZEBRA_ROUTE_TABLE, 150}, + [ZEBRA_ROUTE_LDP] = {ZEBRA_ROUTE_LDP, 150}, + [ZEBRA_ROUTE_VNC] = {ZEBRA_ROUTE_VNC, 20}, + [ZEBRA_ROUTE_VNC_DIRECT] = {ZEBRA_ROUTE_VNC_DIRECT, 20}, + [ZEBRA_ROUTE_VNC_DIRECT_RH] = {ZEBRA_ROUTE_VNC_DIRECT_RH, 20}, + [ZEBRA_ROUTE_BGP_DIRECT] = {ZEBRA_ROUTE_BGP_DIRECT, 20}, + [ZEBRA_ROUTE_BGP_DIRECT_EXT] = {ZEBRA_ROUTE_BGP_DIRECT_EXT, 20}, + [ZEBRA_ROUTE_BABEL] = {ZEBRA_ROUTE_BABEL, 100}, + /* no entry/default: 150 */ };