[bgpd] Add 'bgp open-accept' option, to send OPEN immediately on accepted conns
2007-08-31 Paul Jakma <paul.jakma@sun.com>
* (general) Add 'bgp open-accept' option, to allow bgpd to send OPEN
on accepted connections, i.e. to not wait till after
collision-detect to send OPEN, which appears to be allowed in
RFC4271. This may help speed up establishing sessions, or help
avoid FSM problems with sessions to certain peers. Not enabled by
default though.
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c
index 54f1170..9086737 100644
--- a/bgpd/bgp_vty.c
+++ b/bgpd/bgp_vty.c
@@ -279,6 +279,28 @@
return CMD_SUCCESS;
}
+DEFUN_HIDDEN (bgp_open_accept,
+ bgp_open_accept_cmd,
+ "bgp open-accept",
+ BGP_STR
+ "Send OPEN immediately on accepted connections\n")
+{
+ bgp_option_set (BGP_OPT_ALWAYS_OPEN);
+ return CMD_SUCCESS;
+}
+
+DEFUN_HIDDEN (no_bgp_open_accept,
+ no_bgp_open_accept_cmd,
+ "no bgp open-accept",
+ NO_STR
+ BGP_STR
+ "Send OPEN immediately on accepted connections\n")
+
+{
+ bgp_option_unset (BGP_OPT_ALWAYS_OPEN);
+ return CMD_SUCCESS;
+}
+
DEFUN (no_synchronization,
no_synchronization_cmd,
"no synchronization",
@@ -8820,6 +8842,10 @@
install_element (CONFIG_NODE, &bgp_config_type_cmd);
install_element (CONFIG_NODE, &no_bgp_config_type_cmd);
+ /* "bgp open-all" commands. */
+ install_element (CONFIG_NODE, &bgp_open_accept_cmd);
+ install_element (CONFIG_NODE, &no_bgp_open_accept_cmd);
+
/* Dummy commands (Currently not supported) */
install_element (BGP_NODE, &no_synchronization_cmd);
install_element (BGP_NODE, &no_auto_summary_cmd);