diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2015-12-30 01:32:28 +0900 |
---|---|---|
committer | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2015-12-30 01:42:46 +0900 |
commit | 2daccc33d5b1f82c151197e731afd5e2d032aadd (patch) | |
tree | 95a49e01bac69fe5974d677b045dc9e630a0972c | |
parent | d01c1586b9b1a25965448f9e15a05d94f2b22a5f (diff) |
config: set default bmp port when bmp port is not configured
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
-rw-r--r-- | config/default.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/config/default.go b/config/default.go index 11b62a71..0cc55680 100644 --- a/config/default.go +++ b/config/default.go @@ -40,6 +40,13 @@ func SetDefaultConfigValues(v *viper.Viper, b *Bgp) error { b.Global.ListenConfig.Port = bgp.BGP_PORT } + for idx, server := range b.BmpServers.BmpServerList { + if server.Config.Port == 0 { + server.Config.Port = bgp.BMP_DEFAULT_PORT + } + b.BmpServers.BmpServerList[idx] = server + } + if !v.IsSet("global.mplslabelrange.minlabel") { b.Global.MplsLabelRange.MinLabel = DEFAULT_MPLS_LABEL_MIN } |