install_element (VIEW_NODE, &show_ip_bgp_damp_flap_route_map_cmd);
install_element (VIEW_NODE, &show_ip_bgp_neighbor_flap_cmd);
install_element (VIEW_NODE, &show_ip_bgp_neighbor_damp_cmd);
-
- /* Restricted node: VIEW_NODE - (set of dangerous commands) */
- install_element (RESTRICTED_NODE, &show_ip_bgp_route_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_instance_route_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_route_pathtype_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_instance_route_pathtype_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_ipv4_safi_route_pathtype_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_ipv4_route_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_ipv4_safi_route_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_vpnv4_rd_route_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_prefix_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_instance_prefix_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_ipv4_prefix_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_ipv4_prefix_pathtype_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_ipv4_safi_prefix_pathtype_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_ipv4_safi_prefix_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_prefix_pathtype_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_instance_prefix_pathtype_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_vpnv4_all_prefix_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_vpnv4_rd_prefix_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_instance_route_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_instance_prefix_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_community_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_community2_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_community3_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_community4_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_ipv4_community_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_ipv4_community2_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_ipv4_community3_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_ipv4_community4_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_instance_afi_safi_community_all_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_instance_afi_safi_community_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_instance_afi_safi_community2_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_instance_afi_safi_community3_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_instance_afi_safi_community4_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_community_exact_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_community2_exact_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_community3_exact_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_community4_exact_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_ipv4_community_exact_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_ipv4_community2_exact_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_ipv4_community3_exact_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_ipv4_community4_exact_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_instance_cmd);
install_element (VIEW_NODE, &show_bgp_instance_ipv6_neighbor_flap_cmd);
install_element (VIEW_NODE, &show_bgp_instance_neighbor_damp_cmd);
install_element (VIEW_NODE, &show_bgp_instance_ipv6_neighbor_damp_cmd);
-
- /* Restricted:
- * VIEW_NODE - (set of dangerous commands) - (commands dependent on prev)
- */
- install_element (RESTRICTED_NODE, &show_bgp_route_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_ipv6_route_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_ipv6_safi_route_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_route_pathtype_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_ipv6_route_pathtype_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_ipv6_safi_route_pathtype_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_prefix_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_ipv6_prefix_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_ipv6_safi_prefix_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_prefix_pathtype_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_ipv6_prefix_pathtype_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_ipv6_safi_prefix_pathtype_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_community_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_ipv6_community_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_community2_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_ipv6_community2_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_community3_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_ipv6_community3_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_community4_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_ipv6_community4_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_community_exact_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_ipv6_community_exact_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_community2_exact_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_ipv6_community2_exact_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_community3_exact_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_ipv6_community3_exact_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_community4_exact_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_ipv6_community4_exact_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_instance_route_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_instance_ipv6_route_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_instance_route_pathtype_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_instance_ipv6_route_pathtype_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_instance_prefix_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_instance_ipv6_prefix_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_instance_neighbor_received_prefix_filter_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_instance_ipv6_neighbor_received_prefix_filter_cmd);
install_element (ENABLE_NODE, &show_bgp_cmd);
install_element (ENABLE_NODE, &show_bgp_ipv6_cmd);
install_element (VIEW_NODE, &show_bgp_ipv6_safi_summary_cmd);
install_element (VIEW_NODE, &show_bgp_instance_ipv6_summary_cmd);
install_element (VIEW_NODE, &show_bgp_instance_ipv6_safi_summary_cmd);
-#endif /* HAVE_IPV6 */
- install_element (RESTRICTED_NODE, &show_ip_bgp_summary_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_updgrps_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_instance_updgrps_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_instance_all_updgrps_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_updgrps_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_ipv6_updgrps_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_instance_ipv6_updgrps_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_instance_all_ipv6_updgrps_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_updgrps_s_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_instance_updgrps_s_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_updgrps_s_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_ipv6_updgrps_s_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_instance_ipv6_updgrps_s_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_updgrps_adj_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_instance_updgrps_adj_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_updgrps_adj_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_instance_updgrps_adj_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_updgrps_afi_adj_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_updgrps_adj_s_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_instance_updgrps_adj_s_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_updgrps_adj_s_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_instance_updgrps_adj_s_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_updgrps_afi_adj_s_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_instance_summary_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_instance_all_summary_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_ipv4_summary_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_ipv4_safi_summary_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_instance_ipv4_summary_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_instance_ipv4_safi_summary_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_vpnv4_all_summary_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_vpnv4_rd_summary_cmd);
-#ifdef HAVE_IPV6
- install_element (RESTRICTED_NODE, &show_bgp_summary_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_instance_summary_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_instance_all_summary_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_ipv6_summary_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_ipv6_safi_summary_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_instance_ipv6_summary_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_instance_ipv6_safi_summary_cmd);
#endif /* HAVE_IPV6 */
install_element (ENABLE_NODE, &show_ip_bgp_summary_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_updgrps_cmd);
install_element (VIEW_NODE, &show_ip_bgp_instance_neighbors_cmd);
install_element (VIEW_NODE, &show_ip_bgp_instance_all_neighbors_cmd);
install_element (VIEW_NODE, &show_ip_bgp_instance_neighbors_peer_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_neighbors_peer_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_ipv4_neighbors_peer_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_vpnv4_all_neighbors_peer_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_vpnv4_rd_neighbors_peer_cmd);
- install_element (RESTRICTED_NODE, &show_ip_bgp_instance_neighbors_peer_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_neighbors_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_ipv4_neighbors_cmd);
install_element (ENABLE_NODE, &show_ip_bgp_neighbors_peer_cmd);
install_element (VIEW_NODE, &show_bgp_instance_ipv6_neighbors_cmd);
install_element (VIEW_NODE, &show_bgp_instance_neighbors_peer_cmd);
install_element (VIEW_NODE, &show_bgp_instance_ipv6_neighbors_peer_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_neighbors_peer_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_ipv6_neighbors_peer_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_instance_neighbors_peer_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_instance_ipv6_neighbors_peer_cmd);
install_element (ENABLE_NODE, &show_bgp_neighbors_cmd);
install_element (ENABLE_NODE, &show_bgp_ipv6_neighbors_cmd);
install_element (ENABLE_NODE, &show_bgp_neighbors_peer_cmd);
/* "show bgp memory" commands. */
install_element (VIEW_NODE, &show_bgp_memory_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_memory_cmd);
install_element (ENABLE_NODE, &show_bgp_memory_cmd);
/* "show bgp views" commands. */
install_element (VIEW_NODE, &show_bgp_views_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_views_cmd);
install_element (ENABLE_NODE, &show_bgp_views_cmd);
/* "show bgp vrfs" commands. */
install_element (VIEW_NODE, &show_bgp_vrfs_cmd);
- install_element (RESTRICTED_NODE, &show_bgp_vrfs_cmd);
install_element (ENABLE_NODE, &show_bgp_vrfs_cmd);
/* Community-list. */
--- /dev/null
+/* confdefs.h */
+#define PACKAGE_NAME "Quagga"
+#define PACKAGE_TARNAME "quagga"
+#define PACKAGE_VERSION "0.99.24+cl3u4"
+#define PACKAGE_STRING "Quagga 0.99.24+cl3u4"
+#define PACKAGE_BUGREPORT "https://bugzilla.quagga.net"
+#define PACKAGE_URL ""
+#define PACKAGE "quagga"
+#define VERSION "0.99.24+cl3u4"
+#define STDC_HEADERS 1
+#define HAVE_SYS_TYPES_H 1
+#define HAVE_SYS_STAT_H 1
+#define HAVE_STDLIB_H 1
+#define HAVE_STRING_H 1
+#define HAVE_MEMORY_H 1
+#define HAVE_STRINGS_H 1
+#define HAVE_INTTYPES_H 1
+#define HAVE_STDINT_H 1
+#define HAVE_UNISTD_H 1
+#define __EXTENSIONS__ 1
+#define _ALL_SOURCE 1
+#define _GNU_SOURCE 1
+#define _POSIX_PTHREAD_SEMANTICS 1
+#define _TANDEM_SOURCE 1
+#define HAVE_DLFCN_H 1
+#define LT_OBJDIR ".libs/"
+#define HAVE_JSON_C_JSON_H 1
+#define CONSUMED_TIME_CHECK 5000000
+#define HAVE_V6_RR_SEMANTICS /**/
+#define HAVE_RTADV /**/
+#define QUAGGA_USER "quagga"
+#define QUAGGA_GROUP "quagga"
+#define CONFIGFILE_MASK 0600
+#define LOGFILE_MASK 0600
+#define MULTIPATH_NUM 4
+#define restrict __restrict
+#define STDC_HEADERS 1
+#define TIME_WITH_SYS_TIME 1
+#define HAVE_SYS_WAIT_H 1
+#define HAVE__BOOL 1
+#define HAVE_STDBOOL_H 1
+#define HAVE_STROPTS_H 1
+#define HAVE_SYS_TIMES_H 1
+#define HAVE_SYS_SELECT_H 1
+#define HAVE_SYS_TYPES_H 1
+#define HAVE_LINUX_VERSION_H 1
+#define HAVE_NETDB_H 1
+#define HAVE_ASM_TYPES_H 1
+#define HAVE_SYS_CDEFS_H 1
+#define HAVE_SYS_PARAM_H 1
+#define HAVE_LIMITS_H 1
+#define HAVE_SIGNAL_H 1
+#define HAVE_SYS_SOCKET_H 1
+#define HAVE_NETINET_IN_H 1
+#define HAVE_TIME_H 1
+#define HAVE_SYS_TIME_H 1
+#define HAVE_NET_IF_H 1
+#define HAVE_SYS_UN_H 1
+#define HAVE_NETINET_IN_SYSTM_H 1
+#define HAVE_NET_ROUTE_H 1
+#define HAVE_ARPA_INET_H 1
+#define HAVE_NETINET_IP_ICMP_H 1
+#define HAVE_FCNTL_H 1
+#define HAVE_STDDEF_H 1
+#define HAVE_SYS_IOCTL_H 1
+#define HAVE_SYSLOG_H 1
+#define HAVE_WCHAR_H 1
+#define HAVE_WCTYPE_H 1
+#define HAVE_SYS_SYSCTL_H 1
+#define HAVE_UCONTEXT_H 1
+#define HAVE_UCONTEXT_T_UC_MCONTEXT_GREGS 1
+#define GNU_LINUX /**/
+#define VTYSH /**/
"%s> ",
};
-static struct cmd_node restricted_node =
-{
- RESTRICTED_NODE,
- "%s$ ",
-};
-
static struct cmd_node auth_enable_node =
{
AUTH_ENABLE_NODE,
node != VIEW_NODE &&
node != AUTH_ENABLE_NODE &&
node != ENABLE_NODE &&
- node != RESTRICTED_NODE &&
0 == strcmp( "do", first_word ) )
return 1;
return 0;
{
case VIEW_NODE:
case ENABLE_NODE:
- case RESTRICTED_NODE:
if (vty_shell (vty))
exit (0);
else
{
case VIEW_NODE:
case ENABLE_NODE:
- case RESTRICTED_NODE:
/* Nothing to do. */
break;
case CONFIG_NODE:
install_node (&enable_node, NULL);
install_node (&auth_node, NULL);
install_node (&auth_enable_node, NULL);
- install_node (&restricted_node, NULL);
install_node (&config_node, config_write_host);
/* Each node's basic commands. */
install_element (VIEW_NODE, &show_logging_cmd);
install_element (VIEW_NODE, &show_commandtree_cmd);
install_element (VIEW_NODE, &echo_cmd);
-
- install_element (RESTRICTED_NODE, &config_list_cmd);
- install_element (RESTRICTED_NODE, &config_exit_cmd);
- install_element (RESTRICTED_NODE, &config_quit_cmd);
- install_element (RESTRICTED_NODE, &config_help_cmd);
- install_element (RESTRICTED_NODE, &config_enable_cmd);
- install_element (RESTRICTED_NODE, &config_terminal_length_cmd);
- install_element (RESTRICTED_NODE, &config_terminal_no_length_cmd);
- install_element (RESTRICTED_NODE, &echo_cmd);
}
if (terminal)
install_element (VIEW_NODE, &show_thread_cpu_cmd);
install_element (ENABLE_NODE, &show_thread_cpu_cmd);
- install_element (RESTRICTED_NODE, &show_thread_cpu_cmd);
install_element (ENABLE_NODE, &clear_thread_cpu_cmd);
install_element (VIEW_NODE, &show_work_queues_cmd);
enum node_type
{
AUTH_NODE, /* Authentication mode of vty interface. */
- RESTRICTED_NODE, /* Restricted view mode */
VIEW_NODE, /* View node. Default mode of vty interface. */
AUTH_ENABLE_NODE, /* Authentication mode for change enable. */
ENABLE_NODE, /* Enable node. */
void
memory_init (void)
{
- install_element (RESTRICTED_NODE, &show_memory_cmd);
-
install_element (VIEW_NODE, &show_memory_cmd);
install_element (ENABLE_NODE, &show_memory_cmd);
/* Login password check. */
static int no_password_check = 0;
-/* Restrict unauthenticated logins? */
-static const u_char restricted_mode_default = 0;
-static u_char restricted_mode = 0;
-
/* Integrated configuration file path */
char integrate_default[] = SYSCONFDIR INTEGRATE_DEFAULT_CONFIG;
/* AUTH_ENABLE_NODE */
vty->fail = 0;
vty_out (vty, "%% Bad enable passwords, too many failures!%s", VTY_NEWLINE);
- vty->node = restricted_mode ? RESTRICTED_NODE : VIEW_NODE;
+ vty->status = VTY_CLOSE;
}
}
}
{
case VIEW_NODE:
case ENABLE_NODE:
- case RESTRICTED_NODE:
/* Nothing to do. */
break;
case CONFIG_NODE:
{
case VIEW_NODE:
case ENABLE_NODE:
- case RESTRICTED_NODE:
/* Nothing to do. */
break;
case CONFIG_NODE:
strcpy (vty->address, buf);
if (no_password_check)
{
- if (restricted_mode)
- vty->node = RESTRICTED_NODE;
- else if (host.advanced)
+ if (host.advanced)
vty->node = ENABLE_NODE;
else
vty->node = VIEW_NODE;
return CMD_SUCCESS;
}
-/* initial mode. */
-DEFUN (vty_restricted_mode,
- vty_restricted_mode_cmd,
- "anonymous restricted",
- "Restrict view commands available in anonymous, unauthenticated vty\n")
-{
- restricted_mode = 1;
- return CMD_SUCCESS;
-}
-
-DEFUN (vty_no_restricted_mode,
- vty_no_restricted_mode_cmd,
- "no anonymous restricted",
- NO_STR
- "Enable password checking\n")
-{
- restricted_mode = 0;
- return CMD_SUCCESS;
-}
-
DEFUN (service_advanced_vty,
service_advanced_vty_cmd,
"service advanced-vty",
/* login */
if (no_password_check)
vty_out (vty, " no login%s", VTY_NEWLINE);
-
- if (restricted_mode != restricted_mode_default)
- {
- if (restricted_mode_default)
- vty_out (vty, " no anonymous restricted%s", VTY_NEWLINE);
- else
- vty_out (vty, " anonymous restricted%s", VTY_NEWLINE);
- }
if (do_log_commands)
vty_out (vty, "log commands%s", VTY_NEWLINE);
/* Install bgp top node. */
install_node (&vty_node, vty_config_write);
- install_element (RESTRICTED_NODE, &config_who_cmd);
- install_element (RESTRICTED_NODE, &show_history_cmd);
install_element (VIEW_NODE, &config_who_cmd);
install_element (VIEW_NODE, &show_history_cmd);
install_element (ENABLE_NODE, &config_who_cmd);
install_element (VTY_NODE, &no_vty_access_class_cmd);
install_element (VTY_NODE, &vty_login_cmd);
install_element (VTY_NODE, &no_vty_login_cmd);
- install_element (VTY_NODE, &vty_restricted_mode_cmd);
- install_element (VTY_NODE, &vty_no_restricted_mode_cmd);
#ifdef HAVE_IPV6
install_element (VTY_NODE, &vty_ipv6_access_class_cmd);
install_element (VTY_NODE, &no_vty_ipv6_access_class_cmd);