Revision 6cf72d7a

View differences:

doc/bird.sgml
1875 1875
	Delay in seconds between sending of two consecutive Keepalive messages.
1876 1876
	Default: One third of the hold time.
1877 1877

  
1878
	<tag>connect delay time <m/number/</tag>
1879
	Delay in seconds between protocol startup and the first attempt to
1880
	connect. Default: 5 seconds.
1881

  
1878 1882
	<tag>connect retry time <m/number/</tag>
1879 1883
	Time in seconds to wait before retrying a failed attempt to connect.
1880 1884
	Default: 120 seconds.
1881 1885

  
1882
	<tag>start delay time <m/number/</tag>
1883
	Delay in seconds between protocol startup and the first attempt to
1884
	connect. Default: 5 seconds.
1885

  
1886 1886
	<tag>error wait time <m/number/,<m/number/</tag>
1887 1887
	Minimum and maximum delay in seconds between a protocol failure (either
1888 1888
	local or reported by the peer) and automatic restart. Doesn't apply
proto/bgp/bgp.c
168 168
  if (p->startup_delay)
169 169
    {
170 170
      p->start_state = BSS_DELAY;
171
      BGP_TRACE(D_EVENTS, "Startup delayed by %d seconds", p->startup_delay);
171
      BGP_TRACE(D_EVENTS, "Startup delayed by %d seconds due to errors", p->startup_delay);
172 172
      bgp_start_timer(p->startup_timer, p->startup_delay);
173 173
    }
174 174
  else
......
651 651
static void
652 652
bgp_active(struct bgp_proto *p)
653 653
{
654
  int delay = MAX(1, p->cf->start_delay_time);
654
  int delay = MAX(1, p->cf->connect_delay_time);
655 655
  struct bgp_conn *conn = &p->outgoing_conn;
656 656

  
657 657
  BGP_TRACE(D_EVENTS, "Connect delayed by %d seconds", delay);
......
1417 1417

  
1418 1418
      if ((oc->state == BS_ACTIVE) &&
1419 1419
	  (oc->connect_retry_timer->expires))
1420
	cli_msg(-1006, "    Start delay:      %d/%d",
1421
		oc->connect_retry_timer->expires - now, p->cf->start_delay_time);
1420
	cli_msg(-1006, "    Connect delay:    %d/%d",
1421
		oc->connect_retry_timer->expires - now, p->cf->connect_delay_time);
1422 1422

  
1423 1423
      if (p->gr_active && p->gr_timer->expires)
1424 1424
	cli_msg(-1006, "    Restart timer:    %d/-", p->gr_timer->expires - now);
proto/bgp/bgp.h
51 51
  int allow_local_as;			/* Allow that number of local ASNs in incoming AS_PATHs */
52 52
  int gr_mode;				/* Graceful restart mode (BGP_GR_*) */
53 53
  unsigned gr_time;			/* Graceful restart timeout */
54
  unsigned connect_retry_time;
54
  unsigned connect_delay_time;		/* Minimum delay between connect attempts */
55
  unsigned connect_retry_time;		/* Timeout for connect attempts */
55 56
  unsigned hold_time, initial_hold_time;
56 57
  unsigned keepalive_time;
57
  unsigned start_delay_time;		/* Minimum delay between connects */
58 58
  unsigned error_amnesia_time;		/* Errors are forgotten after */
59 59
  unsigned error_delay_time_min;	/* Time to wait after an error is detected */
60 60
  unsigned error_delay_time_max;
proto/bgp/config.Y
38 38
     BGP_CFG->remote_port = BGP_PORT;
39 39
     BGP_CFG->multihop = -1;	/* undefined */
40 40
     BGP_CFG->hold_time = 240;
41
     BGP_CFG->connect_retry_time = 120;
42 41
     BGP_CFG->initial_hold_time = 240;
43 42
     BGP_CFG->compare_path_lengths = 1;
44 43
     BGP_CFG->igp_metric = 1;
45
     BGP_CFG->start_delay_time = 5;
44
     BGP_CFG->connect_delay_time = 5;
45
     BGP_CFG->connect_retry_time = 120;
46 46
     BGP_CFG->error_amnesia_time = 300;
47 47
     BGP_CFG->error_delay_time_min = 60;
48 48
     BGP_CFG->error_delay_time_max = 300;
......
81 81
 | bgp_proto RS CLIENT ';' { BGP_CFG->rs_client = 1; }
82 82
 | bgp_proto HOLD TIME expr ';' { BGP_CFG->hold_time = $4; }
83 83
 | bgp_proto STARTUP HOLD TIME expr ';' { BGP_CFG->initial_hold_time = $5; }
84
 | bgp_proto CONNECT RETRY TIME expr ';' { BGP_CFG->connect_retry_time = $5; }
85
 | bgp_proto KEEPALIVE TIME expr ';' { BGP_CFG->keepalive_time = $4; }
86 84
 | bgp_proto DIRECT ';' { BGP_CFG->multihop = 0; }
87 85
 | bgp_proto MULTIHOP ';' { BGP_CFG->multihop = 64; }
88 86
 | bgp_proto MULTIHOP expr ';' { BGP_CFG->multihop = $3; if (($3<1) || ($3>255)) cf_error("Multihop must be in range 1-255"); }
......
101 99
 | bgp_proto DEFAULT BGP_MED expr ';' { BGP_CFG->default_med = $4; }
102 100
 | bgp_proto DEFAULT BGP_LOCAL_PREF expr ';' { BGP_CFG->default_local_pref = $4; }
103 101
 | bgp_proto SOURCE ADDRESS ipa ';' { BGP_CFG->source_addr = $4; }
104
 | bgp_proto START DELAY TIME expr ';' { BGP_CFG->start_delay_time = $5; }
102
 | 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); }
103
 | bgp_proto CONNECT DELAY TIME expr ';' { BGP_CFG->connect_delay_time = $5; }
104
 | bgp_proto CONNECT RETRY TIME expr ';' { BGP_CFG->connect_retry_time = $5; }
105
 | bgp_proto KEEPALIVE TIME expr ';' { BGP_CFG->keepalive_time = $4; }
105 106
 | bgp_proto ERROR FORGET TIME expr ';' { BGP_CFG->error_amnesia_time = $5; }
106 107
 | bgp_proto ERROR WAIT TIME expr ',' expr ';' { BGP_CFG->error_delay_time_min = $5; BGP_CFG->error_delay_time_max = $7; }
107 108
 | bgp_proto DISABLE AFTER ERROR bool ';' { BGP_CFG->disable_after_error = $5; }
......
114 115
     this_proto->in_limit = cfg_allocz(sizeof(struct proto_limit));
115 116
     this_proto->in_limit->limit = $4;
116 117
     this_proto->in_limit->action = PLA_RESTART;
118
     log(L_WARN "%s: Route limit option is deprecated, use import limit", this_proto->name);
117 119
   }
118 120
 | bgp_proto PASSIVE bool ';' { BGP_CFG->passive = $3; }
119 121
 | bgp_proto INTERPRET COMMUNITIES bool ';' { BGP_CFG->interpret_communities = $4; }

Also available in: Unified diff