diff options
Diffstat (limited to 'staticd/static_vty.c')
| -rw-r--r-- | staticd/static_vty.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/staticd/static_vty.c b/staticd/static_vty.c index a950b0473e..75bce82eef 100644 --- a/staticd/static_vty.c +++ b/staticd/static_vty.c @@ -614,8 +614,8 @@ int static_config(struct vty *vty, struct static_vrf *svrf, afi_t afi, if (stable == NULL) return write; - sprintf(spacing, "%s%s", (svrf->vrf->vrf_id == VRF_DEFAULT) ? "" : " ", - cmd); + snprintf(spacing, sizeof(spacing), "%s%s", + (svrf->vrf->vrf_id == VRF_DEFAULT) ? "" : " ", cmd); /* * Static routes for vrfs not fully inited @@ -1470,11 +1470,16 @@ DEFUN_NOSH (show_debugging_static, return CMD_SUCCESS; } -static struct cmd_node debug_node = {DEBUG_NODE, "", 1}; +static struct cmd_node debug_node = { + .name = "debug", + .node = DEBUG_NODE, + .prompt = "", + .config_write = static_config_write_debug, +}; void static_vty_init(void) { - install_node(&debug_node, static_config_write_debug); + install_node(&debug_node); install_element(CONFIG_NODE, &ip_mroute_dist_cmd); |
