]> git.proxmox.com Git - mirror_frr.git/blobdiff - nhrpd/nhrp_vty.c
Merge pull request #8262 from reubendowle/fixes/nhrp-misc-fixes
[mirror_frr.git] / nhrpd / nhrp_vty.c
index 707bb4b44f06c8d30cd989f3a1241c175c121ca0..60ce1e652325a7cf5606e5c1dfe8226c147c9808 100644 (file)
@@ -26,15 +26,6 @@ static struct cmd_node zebra_node = {
        .config_write = nhrp_config_write,
 };
 
-static int interface_config_write(struct vty *vty);
-static struct cmd_node nhrp_interface_node = {
-       .name = "interface",
-       .node = INTERFACE_NODE,
-       .parent_node = CONFIG_NODE,
-       .prompt = "%s(config-if)# ",
-       .config_write = interface_config_write,
-};
-
 #define NHRP_DEBUG_FLAGS_CMD "<all|common|event|interface|kernel|route|vici>"
 
 #define NHRP_DEBUG_FLAGS_STR                                                   \
@@ -1218,7 +1209,7 @@ static int interface_config_write(struct vty *vty)
                                        vty_out(vty, "dynamic");
                                else
                                        vty_out(vty, "%pSU", &nhs->proto_addr);
-                               vty_out(vty, "nbma %s\n", nhs->nbma_fqdn);
+                               vty_out(vty, " nbma %s\n", nhs->nbma_fqdn);
                        }
 
                        list_for_each_entry(mcast, &ad->mcastlist_head,
@@ -1268,10 +1259,10 @@ void nhrp_config_init(void)
        install_element(CONFIG_NODE, &nhrp_multicast_nflog_group_cmd);
        install_element(CONFIG_NODE, &no_nhrp_multicast_nflog_group_cmd);
 
-       /* interface specific commands */
-       install_node(&nhrp_interface_node);
+       vrf_cmd_init(NULL, &nhrpd_privs);
 
-       if_cmd_init();
+       /* interface specific commands */
+       if_cmd_init(interface_config_write);
        install_element(INTERFACE_NODE, &tunnel_protection_cmd);
        install_element(INTERFACE_NODE, &no_tunnel_protection_cmd);
        install_element(INTERFACE_NODE, &tunnel_source_cmd);