summaryrefslogtreecommitdiffhomepage
path: root/gobgpd/main.go
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2017-10-31 23:17:43 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2017-11-01 10:53:32 +0900
commitc18a89f7490d14a6a41843b7aaa02516e3a27f8e (patch)
tree502cf16d1e0d04e47ec1482758a046e81f0a48c2 /gobgpd/main.go
parent8a22b48beb083b010d849e8e201ce4fb544afedc (diff)
gobgpd: fix multiple configs handling
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'gobgpd/main.go')
-rw-r--r--gobgpd/main.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/gobgpd/main.go b/gobgpd/main.go
index afdd71c9..fdfb8cca 100644
--- a/gobgpd/main.go
+++ b/gobgpd/main.go
@@ -178,21 +178,21 @@ func main() {
log.Fatalf("failed to set collector config: %s", err)
}
}
- for _, c := range newConfig.RpkiServers {
- if err := bgpServer.AddRpki(&c.Config); err != nil {
+ for i, _ := range newConfig.RpkiServers {
+ if err := bgpServer.AddRpki(&newConfig.RpkiServers[i].Config); err != nil {
log.Fatalf("failed to set rpki config: %s", err)
}
}
- for _, c := range newConfig.BmpServers {
- if err := bgpServer.AddBmp(&c.Config); err != nil {
+ for i, _ := range newConfig.BmpServers {
+ if err := bgpServer.AddBmp(&newConfig.BmpServers[i].Config); err != nil {
log.Fatalf("failed to set bmp config: %s", err)
}
}
- for _, c := range newConfig.MrtDump {
- if len(c.Config.FileName) == 0 {
+ for i, _ := range newConfig.MrtDump {
+ if len(newConfig.MrtDump[i].Config.FileName) == 0 {
continue
}
- if err := bgpServer.EnableMrt(&c.Config); err != nil {
+ if err := bgpServer.EnableMrt(&newConfig.MrtDump[i].Config); err != nil {
log.Fatalf("failed to set mrt config: %s", err)
}
}