diff options
Diffstat (limited to 'config/default.go')
-rw-r--r-- | config/default.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/config/default.go b/config/default.go index d3160989..2170e0dd 100644 --- a/config/default.go +++ b/config/default.go @@ -10,6 +10,8 @@ const ( DEFAULT_HOLDTIME = 90 DEFAULT_IDLE_HOLDTIME_AFTER_RESET = 30 DEFAULT_CONNECT_RETRY = 120 + DEFAULT_MPLS_LABEL_MIN = 16000 + DEFAULT_MPLS_LABEL_MAX = 1048575 ) type neighbor struct { @@ -45,6 +47,14 @@ func SetDefaultConfigValues(md toml.MetaData, bt *Bgp) error { } } + if _, ok := global["Global.MplsLabelRange.MinLabel"]; !ok { + bt.Global.MplsLabelRange.MinLabel = DEFAULT_MPLS_LABEL_MIN + } + + if _, ok := global["Global.MplsLabelRange.MaxLabel"]; !ok { + bt.Global.MplsLabelRange.MaxLabel = DEFAULT_MPLS_LABEL_MAX + } + nidx := 0 for _, key := range md.Keys() { if !strings.HasPrefix(key.String(), "Neighbors.NeighborList") { |