summaryrefslogtreecommitdiffhomepage
path: root/config/default.go
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2015-11-11 22:54:21 +0900
committerISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2015-12-21 19:28:25 +0900
commit406efffa74eadb44826e4b464dc2fbabdddf72c4 (patch)
tree78ba4c1b69ed3272e76175c70b26b2839b93130d /config/default.go
parente71fb3a3ae6129573f50848f7af8e83eb8a4d7e2 (diff)
*: add global listen port configuration
if port < 0, gobgpd won't listen on tcp:179 Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'config/default.go')
-rw-r--r--config/default.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/config/default.go b/config/default.go
index 2170e0dd..9f58a9b8 100644
--- a/config/default.go
+++ b/config/default.go
@@ -47,6 +47,10 @@ func SetDefaultConfigValues(md toml.MetaData, bt *Bgp) error {
}
}
+ if bt.Global.ListenConfig.Port == 0 {
+ bt.Global.ListenConfig.Port = bgp.BGP_PORT
+ }
+
if _, ok := global["Global.MplsLabelRange.MinLabel"]; !ok {
bt.Global.MplsLabelRange.MinLabel = DEFAULT_MPLS_LABEL_MIN
}