mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-11-17 16:48:43 +00:00
Rename BGP option 'start delay' to 'connect delay'
Also update log message for error-triggered startup delay.
This commit is contained in:
parent
a1beb8f3ee
commit
6cf72d7ad7
@ -1875,14 +1875,14 @@ using the following configuration parameters:
|
|||||||
Delay in seconds between sending of two consecutive Keepalive messages.
|
Delay in seconds between sending of two consecutive Keepalive messages.
|
||||||
Default: One third of the hold time.
|
Default: One third of the hold time.
|
||||||
|
|
||||||
|
<tag>connect delay time <m/number/</tag>
|
||||||
|
Delay in seconds between protocol startup and the first attempt to
|
||||||
|
connect. Default: 5 seconds.
|
||||||
|
|
||||||
<tag>connect retry time <m/number/</tag>
|
<tag>connect retry time <m/number/</tag>
|
||||||
Time in seconds to wait before retrying a failed attempt to connect.
|
Time in seconds to wait before retrying a failed attempt to connect.
|
||||||
Default: 120 seconds.
|
Default: 120 seconds.
|
||||||
|
|
||||||
<tag>start delay time <m/number/</tag>
|
|
||||||
Delay in seconds between protocol startup and the first attempt to
|
|
||||||
connect. Default: 5 seconds.
|
|
||||||
|
|
||||||
<tag>error wait time <m/number/,<m/number/</tag>
|
<tag>error wait time <m/number/,<m/number/</tag>
|
||||||
Minimum and maximum delay in seconds between a protocol failure (either
|
Minimum and maximum delay in seconds between a protocol failure (either
|
||||||
local or reported by the peer) and automatic restart. Doesn't apply
|
local or reported by the peer) and automatic restart. Doesn't apply
|
||||||
|
@ -168,7 +168,7 @@ bgp_initiate(struct bgp_proto *p)
|
|||||||
if (p->startup_delay)
|
if (p->startup_delay)
|
||||||
{
|
{
|
||||||
p->start_state = BSS_DELAY;
|
p->start_state = BSS_DELAY;
|
||||||
BGP_TRACE(D_EVENTS, "Startup delayed by %d seconds", p->startup_delay);
|
BGP_TRACE(D_EVENTS, "Startup delayed by %d seconds due to errors", p->startup_delay);
|
||||||
bgp_start_timer(p->startup_timer, p->startup_delay);
|
bgp_start_timer(p->startup_timer, p->startup_delay);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -651,7 +651,7 @@ bgp_setup_sk(struct bgp_conn *conn, sock *s)
|
|||||||
static void
|
static void
|
||||||
bgp_active(struct bgp_proto *p)
|
bgp_active(struct bgp_proto *p)
|
||||||
{
|
{
|
||||||
int delay = MAX(1, p->cf->start_delay_time);
|
int delay = MAX(1, p->cf->connect_delay_time);
|
||||||
struct bgp_conn *conn = &p->outgoing_conn;
|
struct bgp_conn *conn = &p->outgoing_conn;
|
||||||
|
|
||||||
BGP_TRACE(D_EVENTS, "Connect delayed by %d seconds", delay);
|
BGP_TRACE(D_EVENTS, "Connect delayed by %d seconds", delay);
|
||||||
@ -1417,8 +1417,8 @@ bgp_show_proto_info(struct proto *P)
|
|||||||
|
|
||||||
if ((oc->state == BS_ACTIVE) &&
|
if ((oc->state == BS_ACTIVE) &&
|
||||||
(oc->connect_retry_timer->expires))
|
(oc->connect_retry_timer->expires))
|
||||||
cli_msg(-1006, " Start delay: %d/%d",
|
cli_msg(-1006, " Connect delay: %d/%d",
|
||||||
oc->connect_retry_timer->expires - now, p->cf->start_delay_time);
|
oc->connect_retry_timer->expires - now, p->cf->connect_delay_time);
|
||||||
|
|
||||||
if (p->gr_active && p->gr_timer->expires)
|
if (p->gr_active && p->gr_timer->expires)
|
||||||
cli_msg(-1006, " Restart timer: %d/-", p->gr_timer->expires - now);
|
cli_msg(-1006, " Restart timer: %d/-", p->gr_timer->expires - now);
|
||||||
|
@ -51,10 +51,10 @@ struct bgp_config {
|
|||||||
int allow_local_as; /* Allow that number of local ASNs in incoming AS_PATHs */
|
int allow_local_as; /* Allow that number of local ASNs in incoming AS_PATHs */
|
||||||
int gr_mode; /* Graceful restart mode (BGP_GR_*) */
|
int gr_mode; /* Graceful restart mode (BGP_GR_*) */
|
||||||
unsigned gr_time; /* Graceful restart timeout */
|
unsigned gr_time; /* Graceful restart timeout */
|
||||||
unsigned connect_retry_time;
|
unsigned connect_delay_time; /* Minimum delay between connect attempts */
|
||||||
|
unsigned connect_retry_time; /* Timeout for connect attempts */
|
||||||
unsigned hold_time, initial_hold_time;
|
unsigned hold_time, initial_hold_time;
|
||||||
unsigned keepalive_time;
|
unsigned keepalive_time;
|
||||||
unsigned start_delay_time; /* Minimum delay between connects */
|
|
||||||
unsigned error_amnesia_time; /* Errors are forgotten after */
|
unsigned error_amnesia_time; /* Errors are forgotten after */
|
||||||
unsigned error_delay_time_min; /* Time to wait after an error is detected */
|
unsigned error_delay_time_min; /* Time to wait after an error is detected */
|
||||||
unsigned error_delay_time_max;
|
unsigned error_delay_time_max;
|
||||||
|
@ -38,11 +38,11 @@ bgp_proto_start: proto_start BGP {
|
|||||||
BGP_CFG->remote_port = BGP_PORT;
|
BGP_CFG->remote_port = BGP_PORT;
|
||||||
BGP_CFG->multihop = -1; /* undefined */
|
BGP_CFG->multihop = -1; /* undefined */
|
||||||
BGP_CFG->hold_time = 240;
|
BGP_CFG->hold_time = 240;
|
||||||
BGP_CFG->connect_retry_time = 120;
|
|
||||||
BGP_CFG->initial_hold_time = 240;
|
BGP_CFG->initial_hold_time = 240;
|
||||||
BGP_CFG->compare_path_lengths = 1;
|
BGP_CFG->compare_path_lengths = 1;
|
||||||
BGP_CFG->igp_metric = 1;
|
BGP_CFG->igp_metric = 1;
|
||||||
BGP_CFG->start_delay_time = 5;
|
BGP_CFG->connect_delay_time = 5;
|
||||||
|
BGP_CFG->connect_retry_time = 120;
|
||||||
BGP_CFG->error_amnesia_time = 300;
|
BGP_CFG->error_amnesia_time = 300;
|
||||||
BGP_CFG->error_delay_time_min = 60;
|
BGP_CFG->error_delay_time_min = 60;
|
||||||
BGP_CFG->error_delay_time_max = 300;
|
BGP_CFG->error_delay_time_max = 300;
|
||||||
@ -81,8 +81,6 @@ bgp_proto:
|
|||||||
| bgp_proto RS CLIENT ';' { BGP_CFG->rs_client = 1; }
|
| bgp_proto RS CLIENT ';' { BGP_CFG->rs_client = 1; }
|
||||||
| bgp_proto HOLD TIME expr ';' { BGP_CFG->hold_time = $4; }
|
| bgp_proto HOLD TIME expr ';' { BGP_CFG->hold_time = $4; }
|
||||||
| bgp_proto STARTUP HOLD TIME expr ';' { BGP_CFG->initial_hold_time = $5; }
|
| bgp_proto STARTUP HOLD TIME expr ';' { BGP_CFG->initial_hold_time = $5; }
|
||||||
| bgp_proto CONNECT RETRY TIME expr ';' { BGP_CFG->connect_retry_time = $5; }
|
|
||||||
| bgp_proto KEEPALIVE TIME expr ';' { BGP_CFG->keepalive_time = $4; }
|
|
||||||
| bgp_proto DIRECT ';' { BGP_CFG->multihop = 0; }
|
| bgp_proto DIRECT ';' { BGP_CFG->multihop = 0; }
|
||||||
| bgp_proto MULTIHOP ';' { BGP_CFG->multihop = 64; }
|
| bgp_proto MULTIHOP ';' { BGP_CFG->multihop = 64; }
|
||||||
| bgp_proto MULTIHOP expr ';' { BGP_CFG->multihop = $3; if (($3<1) || ($3>255)) cf_error("Multihop must be in range 1-255"); }
|
| bgp_proto MULTIHOP expr ';' { BGP_CFG->multihop = $3; if (($3<1) || ($3>255)) cf_error("Multihop must be in range 1-255"); }
|
||||||
@ -101,7 +99,10 @@ bgp_proto:
|
|||||||
| bgp_proto DEFAULT BGP_MED expr ';' { BGP_CFG->default_med = $4; }
|
| bgp_proto DEFAULT BGP_MED expr ';' { BGP_CFG->default_med = $4; }
|
||||||
| bgp_proto DEFAULT BGP_LOCAL_PREF expr ';' { BGP_CFG->default_local_pref = $4; }
|
| bgp_proto DEFAULT BGP_LOCAL_PREF expr ';' { BGP_CFG->default_local_pref = $4; }
|
||||||
| bgp_proto SOURCE ADDRESS ipa ';' { BGP_CFG->source_addr = $4; }
|
| bgp_proto SOURCE ADDRESS ipa ';' { BGP_CFG->source_addr = $4; }
|
||||||
| bgp_proto START DELAY TIME expr ';' { BGP_CFG->start_delay_time = $5; }
|
| bgp_proto START DELAY TIME expr ';' { BGP_CFG->connect_delay_time = $5; log(L_WARN "%s: Start delay time option is deprecated, use connect delay time", this_proto->name); }
|
||||||
|
| bgp_proto CONNECT DELAY TIME expr ';' { BGP_CFG->connect_delay_time = $5; }
|
||||||
|
| bgp_proto CONNECT RETRY TIME expr ';' { BGP_CFG->connect_retry_time = $5; }
|
||||||
|
| bgp_proto KEEPALIVE TIME expr ';' { BGP_CFG->keepalive_time = $4; }
|
||||||
| bgp_proto ERROR FORGET TIME expr ';' { BGP_CFG->error_amnesia_time = $5; }
|
| bgp_proto ERROR FORGET TIME expr ';' { BGP_CFG->error_amnesia_time = $5; }
|
||||||
| bgp_proto ERROR WAIT TIME expr ',' expr ';' { BGP_CFG->error_delay_time_min = $5; BGP_CFG->error_delay_time_max = $7; }
|
| bgp_proto ERROR WAIT TIME expr ',' expr ';' { BGP_CFG->error_delay_time_min = $5; BGP_CFG->error_delay_time_max = $7; }
|
||||||
| bgp_proto DISABLE AFTER ERROR bool ';' { BGP_CFG->disable_after_error = $5; }
|
| bgp_proto DISABLE AFTER ERROR bool ';' { BGP_CFG->disable_after_error = $5; }
|
||||||
@ -114,6 +115,7 @@ bgp_proto:
|
|||||||
this_proto->in_limit = cfg_allocz(sizeof(struct proto_limit));
|
this_proto->in_limit = cfg_allocz(sizeof(struct proto_limit));
|
||||||
this_proto->in_limit->limit = $4;
|
this_proto->in_limit->limit = $4;
|
||||||
this_proto->in_limit->action = PLA_RESTART;
|
this_proto->in_limit->action = PLA_RESTART;
|
||||||
|
log(L_WARN "%s: Route limit option is deprecated, use import limit", this_proto->name);
|
||||||
}
|
}
|
||||||
| bgp_proto PASSIVE bool ';' { BGP_CFG->passive = $3; }
|
| bgp_proto PASSIVE bool ';' { BGP_CFG->passive = $3; }
|
||||||
| bgp_proto INTERPRET COMMUNITIES bool ';' { BGP_CFG->interpret_communities = $4; }
|
| bgp_proto INTERPRET COMMUNITIES bool ';' { BGP_CFG->interpret_communities = $4; }
|
||||||
|
Loading…
Reference in New Issue
Block a user