summaryrefslogtreecommitdiffhomepage
path: root/config/default.go
blob: 1b9b59c5b85c8e05ff543c62fd45cbd037d24aa5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package config

const (
	DEFAULT_HOLDTIME = 90
)

func setTimersTypeDefault(timersT *TimersType) {
	if timersT.HoldTime == 0 {
		timersT.HoldTime = float64(DEFAULT_HOLDTIME)
	}
	if timersT.KeepaliveInterval == 0 {
		timersT.KeepaliveInterval = timersT.HoldTime / 3
	}
}

func SetNeighborTypeDefault(neighborT *NeighborType) {
	setTimersTypeDefault(&neighborT.Timers)
}