summaryrefslogtreecommitdiff
path: root/bgpd/bgp_vty.c
diff options
context:
space:
mode:
Diffstat (limited to 'bgpd/bgp_vty.c')
-rw-r--r--bgpd/bgp_vty.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c
index 52025b76..f7a41f5b 100644
--- a/bgpd/bgp_vty.c
+++ b/bgpd/bgp_vty.c
@@ -971,6 +971,38 @@ DEFUN (no_bgp_bestpath_aspath_ignore,
return CMD_SUCCESS;
}
+/* "bgp bestpath as-path confed" configuration. */
+DEFUN (bgp_bestpath_aspath_confed,
+ bgp_bestpath_aspath_confed_cmd,
+ "bgp bestpath as-path confed",
+ "BGP specific commands\n"
+ "Change the default bestpath selection\n"
+ "AS-path attribute\n"
+ "Compare path lengths including confederation sets & sequences in selecting a route\n")
+{
+ struct bgp *bgp;
+
+ bgp = vty->index;
+ bgp_flag_set (bgp, BGP_FLAG_ASPATH_CONFED);
+ return CMD_SUCCESS;
+}
+
+DEFUN (no_bgp_bestpath_aspath_confed,
+ no_bgp_bestpath_aspath_confed_cmd,
+ "no bgp bestpath as-path confed",
+ NO_STR
+ "BGP specific commands\n"
+ "Change the default bestpath selection\n"
+ "AS-path attribute\n"
+ "Compare path lengths including confederation sets & sequences in selecting a route\n")
+{
+ struct bgp *bgp;
+
+ bgp = vty->index;
+ bgp_flag_unset (bgp, BGP_FLAG_ASPATH_CONFED);
+ return CMD_SUCCESS;
+}
+
/* "bgp log-neighbor-changes" configuration. */
DEFUN (bgp_log_neighbor_changes,
bgp_log_neighbor_changes_cmd,
@@ -8626,6 +8658,10 @@ bgp_vty_init ()
install_element (BGP_NODE, &bgp_bestpath_aspath_ignore_cmd);
install_element (BGP_NODE, &no_bgp_bestpath_aspath_ignore_cmd);
+ /* "bgp bestpath as-path confed" commands */
+ install_element (BGP_NODE, &bgp_bestpath_aspath_confed_cmd);
+ install_element (BGP_NODE, &no_bgp_bestpath_aspath_confed_cmd);
+
/* "bgp log-neighbor-changes" commands */
install_element (BGP_NODE, &bgp_log_neighbor_changes_cmd);
install_element (BGP_NODE, &no_bgp_log_neighbor_changes_cmd);