[cmaster-next] [PATCH] zebra: fix segfault on "show mpls table"
Renato Westphal
renato at opensourcerouting.org
Mon Dec 5 15:19:47 EST 2016
Signed-off-by: Renato Westphal <renato at opensourcerouting.org>
---
zebra/zebra_mpls_vty.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/zebra/zebra_mpls_vty.c b/zebra/zebra_mpls_vty.c
index ff84c59..ca59764 100644
--- a/zebra/zebra_mpls_vty.c
+++ b/zebra/zebra_mpls_vty.c
@@ -789,10 +789,10 @@ DEFUN (show_mpls_table,
"JavaScript Object Notation\n")
{
struct zebra_vrf *zvrf;
- u_char use_json = (argv[3]->arg != NULL);
+ u_char uj = use_json (argc, argv);
zvrf = vrf_info_lookup(VRF_DEFAULT);
- zebra_mpls_print_lsp_table(vty, zvrf, use_json);
+ zebra_mpls_print_lsp_table(vty, zvrf, uj);
return CMD_SUCCESS;
}
@@ -807,11 +807,11 @@ DEFUN (show_mpls_table_lsp,
{
u_int32_t label;
struct zebra_vrf *zvrf;
- u_char use_json = (argv[4]->arg != NULL);
+ u_char uj = use_json (argc, argv);
zvrf = vrf_info_lookup(VRF_DEFAULT);
label = atoi(argv[3]->arg);
- zebra_mpls_print_lsp (vty, zvrf, label, use_json);
+ zebra_mpls_print_lsp (vty, zvrf, label, uj);
return CMD_SUCCESS;
}
--
1.9.1
More information about the dev
mailing list