diff options
-rw-r--r-- | config/default.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/config/default.go b/config/default.go new file mode 100644 index 00000000..1b9b59c5 --- /dev/null +++ b/config/default.go @@ -0,0 +1,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) +} |