diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2015-10-20 16:05:41 +0900 |
---|---|---|
committer | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2015-10-20 16:05:41 +0900 |
commit | e0a0fd792d98ce1d092531fc20fcc2b8fa5cffba (patch) | |
tree | 7895159e14d1876c9017d57ae5a3f206ecf4ad06 /gobgpd | |
parent | 5af15b1d9c7ef62039356de9874b6d68658ec024 (diff) |
server: properly handle invalid policy config
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'gobgpd')
-rw-r--r-- | gobgpd/main.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gobgpd/main.go b/gobgpd/main.go index fd657c3f..1b5cd959 100644 --- a/gobgpd/main.go +++ b/gobgpd/main.go @@ -184,7 +184,9 @@ func main() { if policyConfig == nil { policyConfig = &newConfig.Policy - bgpServer.SetPolicy(newConfig.Policy) + if err := bgpServer.SetPolicy(newConfig.Policy); err != nil { + log.Fatal(err) + } } else { if config.CheckPolicyDifference(policyConfig, &newConfig.Policy) { log.Info("Policy config is updated") |