]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: `debug zebra kernel msgdump` is linux specific
authorDonald Sharp <sharpd@nvidia.com>
Thu, 5 Aug 2021 18:02:16 +0000 (14:02 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Fri, 6 Aug 2021 14:04:40 +0000 (10:04 -0400)
The command `debug zebra kernel msgdump is netlink specific.
There is no point at all to allow this to be configed on non
netlink platforms.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
zebra/debug.c

index 88a3d98815e8225a16f50cd0e8b708531ff0b97b..525180d4eecf4ffd4c6a773d93c545c881c350fc 100644 (file)
@@ -244,6 +244,7 @@ DEFUN (debug_zebra_kernel,
        return CMD_SUCCESS;
 }
 
+#if defined(HAVE_NETLINK)
 DEFUN (debug_zebra_kernel_msgdump,
        debug_zebra_kernel_msgdump_cmd,
        "debug zebra kernel msgdump [<recv|send>]",
@@ -267,6 +268,7 @@ DEFUN (debug_zebra_kernel_msgdump,
 
        return CMD_SUCCESS;
 }
+#endif
 
 DEFUN (debug_zebra_rib,
        debug_zebra_rib_cmd,
@@ -465,6 +467,7 @@ DEFUN (no_debug_zebra_kernel,
        return CMD_SUCCESS;
 }
 
+#if defined(HAVE_NETLINK)
 DEFUN (no_debug_zebra_kernel_msgdump,
        no_debug_zebra_kernel_msgdump_cmd,
        "no debug zebra kernel msgdump [<recv|send>]",
@@ -489,6 +492,7 @@ DEFUN (no_debug_zebra_kernel_msgdump,
 
        return CMD_SUCCESS;
 }
+#endif
 
 DEFUN (no_debug_zebra_rib,
        no_debug_zebra_rib_cmd,
@@ -721,7 +725,9 @@ void zebra_debug_init(void)
        install_element(ENABLE_NODE, &debug_zebra_pw_cmd);
        install_element(ENABLE_NODE, &debug_zebra_packet_cmd);
        install_element(ENABLE_NODE, &debug_zebra_kernel_cmd);
+#if defined(HAVE_NETLINK)
        install_element(ENABLE_NODE, &debug_zebra_kernel_msgdump_cmd);
+#endif
        install_element(ENABLE_NODE, &debug_zebra_rib_cmd);
        install_element(ENABLE_NODE, &debug_zebra_fpm_cmd);
        install_element(ENABLE_NODE, &debug_zebra_dplane_cmd);
@@ -734,7 +740,9 @@ void zebra_debug_init(void)
        install_element(ENABLE_NODE, &no_debug_zebra_vxlan_cmd);
        install_element(ENABLE_NODE, &no_debug_zebra_packet_cmd);
        install_element(ENABLE_NODE, &no_debug_zebra_kernel_cmd);
+#if defined(HAVE_NETLINK)
        install_element(ENABLE_NODE, &no_debug_zebra_kernel_msgdump_cmd);
+#endif
        install_element(ENABLE_NODE, &no_debug_zebra_rib_cmd);
        install_element(ENABLE_NODE, &no_debug_zebra_fpm_cmd);
        install_element(ENABLE_NODE, &no_debug_zebra_dplane_cmd);
@@ -748,7 +756,9 @@ void zebra_debug_init(void)
        install_element(CONFIG_NODE, &debug_zebra_pw_cmd);
        install_element(CONFIG_NODE, &debug_zebra_packet_cmd);
        install_element(CONFIG_NODE, &debug_zebra_kernel_cmd);
+#if defined(HAVE_NETLINK)
        install_element(CONFIG_NODE, &debug_zebra_kernel_msgdump_cmd);
+#endif
        install_element(CONFIG_NODE, &debug_zebra_rib_cmd);
        install_element(CONFIG_NODE, &debug_zebra_fpm_cmd);
        install_element(CONFIG_NODE, &debug_zebra_dplane_cmd);
@@ -761,7 +771,9 @@ void zebra_debug_init(void)
        install_element(CONFIG_NODE, &no_debug_zebra_vxlan_cmd);
        install_element(CONFIG_NODE, &no_debug_zebra_packet_cmd);
        install_element(CONFIG_NODE, &no_debug_zebra_kernel_cmd);
+#if defined(HAVE_NETLINK)
        install_element(CONFIG_NODE, &no_debug_zebra_kernel_msgdump_cmd);
+#endif
        install_element(CONFIG_NODE, &no_debug_zebra_rib_cmd);
        install_element(CONFIG_NODE, &no_debug_zebra_fpm_cmd);
        install_element(CONFIG_NODE, &no_debug_zebra_dplane_cmd);