summaryrefslogtreecommitdiffhomepage
path: root/gobgpd
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2015-10-20 16:05:41 +0900
committerISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2015-10-20 16:05:41 +0900
commite0a0fd792d98ce1d092531fc20fcc2b8fa5cffba (patch)
tree7895159e14d1876c9017d57ae5a3f206ecf4ad06 /gobgpd
parent5af15b1d9c7ef62039356de9874b6d68658ec024 (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.go4
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")