From 5734509c0545ebd95a5b8e3f22a911c1a39ffa1b Mon Sep 17 00:00:00 2001 From: Paul Jakma Date: Sun, 25 Dec 2011 17:52:09 +0100 Subject: babeld: Initial import, for Babel routing protocol. * Initial import of the Babel routing protocol, ported to Quagga. * LICENCE: Update the original LICENCE file to include all known potentially applicable copyright claims. Ask that any future contributors to babeld/ grant MIT/X11 licence to their work. * *.{c,h}: Add GPL headers, in according with the SFLC guidance on dealing with potentially mixed GPL/other licensed work, at: https://www.softwarefreedom.org/resources/2007/gpl-non-gpl-collaboration.html --- zebra/client_main.c | 1 + zebra/zebra_rib.c | 26 ++++++++++++++------------ 2 files changed, 15 insertions(+), 12 deletions(-) (limited to 'zebra') diff --git a/zebra/client_main.c b/zebra/client_main.c index ce01231f..8b95907b 100644 --- a/zebra/client_main.c +++ b/zebra/client_main.c @@ -115,6 +115,7 @@ struct zebra_info { "static", ZEBRA_ROUTE_STATIC }, { "rip", ZEBRA_ROUTE_RIP }, { "ripng", ZEBRA_ROUTE_RIPNG }, + { "babel", ZEBRA_ROUTE_BABEL }, { "ospf", ZEBRA_ROUTE_OSPF }, { "ospf6", ZEBRA_ROUTE_OSPF6 }, { "bgp", ZEBRA_ROUTE_BGP }, diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index 21878aa6..f7f4d0a2 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -55,18 +55,19 @@ static const struct { int key; int distance; -} route_info[] = -{ - {ZEBRA_ROUTE_SYSTEM, 0}, - {ZEBRA_ROUTE_KERNEL, 0}, - {ZEBRA_ROUTE_CONNECT, 0}, - {ZEBRA_ROUTE_STATIC, 1}, - {ZEBRA_ROUTE_RIP, 120}, - {ZEBRA_ROUTE_RIPNG, 120}, - {ZEBRA_ROUTE_OSPF, 110}, - {ZEBRA_ROUTE_OSPF6, 110}, - {ZEBRA_ROUTE_ISIS, 115}, - {ZEBRA_ROUTE_BGP, 20 /* IBGP is 200. */} +} route_info[ZEBRA_ROUTE_MAX] = +{ + [ZEBRA_ROUTE_SYSTEM] = {ZEBRA_ROUTE_SYSTEM, 0}, + [ZEBRA_ROUTE_KERNEL] = {ZEBRA_ROUTE_KERNEL, 0}, + [ZEBRA_ROUTE_CONNECT] = {ZEBRA_ROUTE_CONNECT, 0}, + [ZEBRA_ROUTE_STATIC] = {ZEBRA_ROUTE_STATIC, 1}, + [ZEBRA_ROUTE_RIP] = {ZEBRA_ROUTE_RIP, 120}, + [ZEBRA_ROUTE_RIPNG] = {ZEBRA_ROUTE_RIPNG, 120}, + [ZEBRA_ROUTE_OSPF] = {ZEBRA_ROUTE_OSPF, 110}, + [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_BABEL] = {ZEBRA_ROUTE_BABEL, 95}, /* no entry/default: 150 */ }; @@ -1235,6 +1236,7 @@ static const u_char meta_queue_map[ZEBRA_ROUTE_MAX] = { [ZEBRA_ROUTE_ISIS] = 2, [ZEBRA_ROUTE_BGP] = 3, [ZEBRA_ROUTE_HSLS] = 4, + [ZEBRA_ROUTE_BABEL] = 2, }; /* Look into the RN and queue it into one or more priority queues, -- cgit v1.2.1 From 578ce371d12422ce444f31ae4e51b21675c74b55 Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Thu, 9 Feb 2012 13:42:28 +0100 Subject: zebra: Display uptime of Babel routes in show ip[v6] route. --- zebra/zebra_vty.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'zebra') diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index f3a7d46d..dafcf75a 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -556,6 +556,7 @@ vty_show_ip_route_detail (struct vty *vty, struct route_node *rn) #define ONE_WEEK_SECOND 60*60*24*7 if (rib->type == ZEBRA_ROUTE_RIP || rib->type == ZEBRA_ROUTE_OSPF + || rib->type == ZEBRA_ROUTE_BABEL || rib->type == ZEBRA_ROUTE_ISIS || rib->type == ZEBRA_ROUTE_BGP) { @@ -774,6 +775,7 @@ vty_show_ip_route (struct vty *vty, struct route_node *rn, struct rib *rib) if (rib->type == ZEBRA_ROUTE_RIP || rib->type == ZEBRA_ROUTE_OSPF + || rib->type == ZEBRA_ROUTE_BABEL || rib->type == ZEBRA_ROUTE_ISIS || rib->type == ZEBRA_ROUTE_BGP) { @@ -1532,6 +1534,7 @@ vty_show_ipv6_route_detail (struct vty *vty, struct route_node *rn) #define ONE_WEEK_SECOND 60*60*24*7 if (rib->type == ZEBRA_ROUTE_RIPNG || rib->type == ZEBRA_ROUTE_OSPF6 + || rib->type == ZEBRA_ROUTE_BABEL || rib->type == ZEBRA_ROUTE_ISIS || rib->type == ZEBRA_ROUTE_BGP) { @@ -1711,6 +1714,7 @@ vty_show_ipv6_route (struct vty *vty, struct route_node *rn, if (rib->type == ZEBRA_ROUTE_RIPNG || rib->type == ZEBRA_ROUTE_OSPF6 + || rib->type == ZEBRA_ROUTE_BABEL || rib->type == ZEBRA_ROUTE_ISIS || rib->type == ZEBRA_ROUTE_BGP) { -- cgit v1.2.1