summaryrefslogtreecommitdiff
path: root/proto
diff options
context:
space:
mode:
Diffstat (limited to 'proto')
-rw-r--r--proto/bgp/bgp.c8
-rw-r--r--proto/bgp/bgp.h4
-rw-r--r--proto/bgp/config.Y12
3 files changed, 13 insertions, 11 deletions
diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c
index 07fd8478..050f737f 100644
--- a/proto/bgp/bgp.c
+++ b/proto/bgp/bgp.c
@@ -168,7 +168,7 @@ bgp_initiate(struct bgp_proto *p)
if (p->startup_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);
}
else
@@ -651,7 +651,7 @@ bgp_setup_sk(struct bgp_conn *conn, sock *s)
static void
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;
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) &&
(oc->connect_retry_timer->expires))
- cli_msg(-1006, " Start delay: %d/%d",
- oc->connect_retry_timer->expires - now, p->cf->start_delay_time);
+ cli_msg(-1006, " Connect delay: %d/%d",
+ oc->connect_retry_timer->expires - now, p->cf->connect_delay_time);
if (p->gr_active && p->gr_timer->expires)
cli_msg(-1006, " Restart timer: %d/-", p->gr_timer->expires - now);
diff --git a/proto/bgp/bgp.h b/proto/bgp/bgp.h
index ec0b99c5..2c2b02b8 100644
--- a/proto/bgp/bgp.h
+++ b/proto/bgp/bgp.h
@@ -51,10 +51,10 @@ struct bgp_config {
int allow_local_as; /* Allow that number of local ASNs in incoming AS_PATHs */
int gr_mode; /* Graceful restart mode (BGP_GR_*) */
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 keepalive_time;
- unsigned start_delay_time; /* Minimum delay between connects */
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_max;
diff --git a/proto/bgp/config.Y b/proto/bgp/config.Y
index 2da79530..49afe5ae 100644
--- a/proto/bgp/config.Y
+++ b/proto/bgp/config.Y
@@ -38,11 +38,11 @@ bgp_proto_start: proto_start BGP {
BGP_CFG->remote_port = BGP_PORT;
BGP_CFG->multihop = -1; /* undefined */
BGP_CFG->hold_time = 240;
- BGP_CFG->connect_retry_time = 120;
BGP_CFG->initial_hold_time = 240;
BGP_CFG->compare_path_lengths = 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_delay_time_min = 60;
BGP_CFG->error_delay_time_max = 300;
@@ -81,8 +81,6 @@ bgp_proto:
| bgp_proto RS CLIENT ';' { BGP_CFG->rs_client = 1; }
| bgp_proto HOLD TIME expr ';' { BGP_CFG->hold_time = $4; }
| 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 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"); }
@@ -101,7 +99,10 @@ bgp_proto:
| 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 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 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; }
@@ -114,6 +115,7 @@ bgp_proto:
this_proto->in_limit = cfg_allocz(sizeof(struct proto_limit));
this_proto->in_limit->limit = $4;
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 INTERPRET COMMUNITIES bool ';' { BGP_CFG->interpret_communities = $4; }