]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: Fix up default admin distance for some route types
authorDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 26 Jun 2017 14:44:50 +0000 (10:44 -0400)
committerRenato Westphal <renato@opensourcerouting.org>
Tue, 12 Sep 2017 13:59:07 +0000 (10:59 -0300)
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 <sharpd@cumulusnetworks.com>
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
zebra/zebra_rib.c

index c4c80b156b796c9c0188b5e027c6ade99feab422..e0c92801ce3f8a47978d44e5acc8717ff206b783 100644 (file)
@@ -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 */
 };