summaryrefslogtreecommitdiff
path: root/zebra/zebra_vty.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-08-27 10:43:37 -0400
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-10-24 06:52:07 -0400
commit89272910f738c05ba7986e7d91c14dc0eb1f6ba6 (patch)
treebbf83ea49b2b84b0264e763c656f21158d1c2670 /zebra/zebra_vty.c
parent82d6d6e9be004cd8dbe88b0603f6420fcd80a0a5 (diff)
zebra: Start breakup of zns into zrouter and zns
The `struct zebra_ns` data structure is being used for both router information as well as support for the vrf backend( as appropriate ). This is a confusing state. Start the movement of `struct zebra_ns` into 2 things `struct zebra_router` and `struct zebra_ns`. In this new regime `struct zebra_router` is purely for handling data about the router. It has no knowledge of the underlying representation of the Data Plane. `struct zebra_ns` becomes a linux specific bit of code that allows us to handle the vrf backend and is allowed to have knowledge about underlying data plane constructs. When someone implements a *bsd backend the zebra_vrf data structure will need to be abstracted to take advantage of this instead of relying on zebra_ns. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_vty.c')
-rw-r--r--zebra/zebra_vty.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c
index fdedb30f84..40d673a891 100644
--- a/zebra/zebra_vty.c
+++ b/zebra/zebra_vty.c
@@ -35,6 +35,7 @@
#include "srcdest_table.h"
#include "vxlan.h"
+#include "zebra/zebra_router.h"
#include "zebra/zserv.h"
#include "zebra/zebra_vrf.h"
#include "zebra/zebra_mpls.h"
@@ -896,7 +897,7 @@ DEFPY (show_route_table,
struct zebra_vrf *zvrf = zebra_vrf_lookup_by_id(VRF_DEFAULT);
struct route_table *t;
- t = zebra_ns_find_table(zvrf->zns, table, afi);
+ t = zebra_router_find_table(zvrf, table, afi, SAFI_UNICAST);
if (t)
do_show_route_helper(vty, zvrf, t, afi, false, 0, false, false,
0, 0, !!json);
@@ -925,7 +926,7 @@ DEFPY (show_route_table_vrf,
VRF_GET_ID(vrf_id, vrf_name, !!json);
zvrf = zebra_vrf_lookup_by_id(vrf_id);
- t = zebra_ns_find_table(zvrf->zns, table, afi);
+ t = zebra_router_find_table(zvrf, table, afi, SAFI_UNICAST);
if (t)
do_show_route_helper(vty, zvrf, t, afi, false, 0, false, false,
0, 0, !!json);