diff options
-rw-r--r-- | config/serve.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/config/serve.go b/config/serve.go index 23e4c1de..02eb2e6e 100644 --- a/config/serve.go +++ b/config/serve.go @@ -2,6 +2,7 @@ package config import ( "github.com/BurntSushi/toml" + log "github.com/Sirupsen/logrus" ) func ReadConfigfileServe(path string, configCh chan BgpType, reloadCh chan bool) { @@ -10,7 +11,9 @@ func ReadConfigfileServe(path string, configCh chan BgpType, reloadCh chan bool) b := BgpType{} _, err := toml.DecodeFile(path, &b) - if err == nil { + if err != nil { + log.Fatal("can't read config file ", path) + } else { // TODO: validate configuration for i, _ := range b.NeighborList { SetNeighborTypeDefault(&b.NeighborList[i]) |