]> git.proxmox.com Git - mirror_frr.git/blobdiff - zebra/debug.c
Merge pull request #468 from qlyoung/fix-list-perm
[mirror_frr.git] / zebra / debug.c
index 2e9fef292ba7e91e45a090c5420915acfd9fd7ae..a42d5aa3ef98763887c70bb74f19aea428db5e74 100644 (file)
@@ -173,11 +173,12 @@ DEFUN (debug_zebra_kernel_msgdump,
        "Dump raw netlink messages received\n"
        "Dump raw netlink messages sent\n")
 {
-  int idx_recv_send = 4;
-  if (argv[idx_recv_send]->arg && strncmp(argv[idx_recv_send]->arg, "recv", strlen(argv[idx_recv_send]->arg)) == 0)
+  int idx = 0;
+  if (argc == 4 || argv_find (argv, argc, "recv", &idx))
     SET_FLAG(zebra_debug_kernel, ZEBRA_DEBUG_KERNEL_MSGDUMP_RECV);
-  if (!argv[idx_recv_send]->arg || strncmp(argv[idx_recv_send]->arg, "send", strlen(argv[idx_recv_send]->arg)) == 0)
+  if (argc == 4 || argv_find (argv, argc, "send", &idx))
     SET_FLAG(zebra_debug_kernel, ZEBRA_DEBUG_KERNEL_MSGDUMP_SEND);
+
   return CMD_SUCCESS;
 }
 
@@ -399,6 +400,11 @@ config_write_debug (struct vty *vty)
       vty_out (vty, "debug zebra fpm%s", VTY_NEWLINE);
       write++;
     }
+  if (IS_ZEBRA_DEBUG_NHT)
+    {
+      vty_out (vty, "debug zebra nht%s", VTY_NEWLINE);
+      write++;
+    }
   if (IS_ZEBRA_DEBUG_MPLS)
     {
       vty_out (vty, "debug zebra mpls%s", VTY_NEWLINE);