diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2015-03-18 08:51:40 +0000 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-03-25 18:17:51 +0900 |
commit | 746ffa1cf79c935f6ea30e8e4e53bc6028015ceb (patch) | |
tree | 35adf56ede897f43cc3272d668c9b1ed8f9e3d9b /config/default.go | |
parent | 940201eccae3ffb34fb59fe814174b0bc5be1bd1 (diff) |
config: add default connect retry value
use RFC4271 recommended value.
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'config/default.go')
-rw-r--r-- | config/default.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/config/default.go b/config/default.go index f61806a3..8b7f1fb7 100644 --- a/config/default.go +++ b/config/default.go @@ -9,6 +9,7 @@ import ( const ( DEFAULT_HOLDTIME = 90 DEFAULT_IDLE_HOLDTIME_AFTER_RESET = 30 + DEFAULT_CONNECT_RETRY = 120 ) type neighbor struct { @@ -49,6 +50,9 @@ func SetDefaultConfigValues(md toml.MetaData, bt *Bgp) error { } } for i, n := range neighbors { + if _, ok := n.attributes["NeighborList.Timers.ConnectRetry"]; !ok { + bt.NeighborList[i].Timers.HoldTime = float64(DEFAULT_CONNECT_RETRY) + } if _, ok := n.attributes["NeighborList.Timers.HoldTime"]; !ok { bt.NeighborList[i].Timers.HoldTime = float64(DEFAULT_HOLDTIME) } |