diff options
Diffstat (limited to 'cmd/gobgpd/main.go')
-rw-r--r-- | cmd/gobgpd/main.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/cmd/gobgpd/main.go b/cmd/gobgpd/main.go index 7ad06434..569c2daa 100644 --- a/cmd/gobgpd/main.go +++ b/cmd/gobgpd/main.go @@ -238,25 +238,25 @@ func main() { if c == nil { c = newConfig if err := bgpServer.StartBgp(context.Background(), &api.StartBgpRequest{ - Global: config.NewGlobalFromConfigStruct(&c.Global), + Global: config.NewGlobalFromConfigStruct(&newConfig.Global), }); err != nil { log.Fatalf("failed to set global config: %s", err) } if newConfig.Zebra.Config.Enabled { - tps := c.Zebra.Config.RedistributeRouteTypeList + tps := newConfig.Zebra.Config.RedistributeRouteTypeList l := make([]string, 0, len(tps)) for _, t := range tps { l = append(l, string(t)) } if err := bgpServer.EnableZebra(context.Background(), &api.EnableZebraRequest{ - Url: c.Zebra.Config.Url, + Url: newConfig.Zebra.Config.Url, RouteTypes: l, - Version: uint32(c.Zebra.Config.Version), - NexthopTriggerEnable: c.Zebra.Config.NexthopTriggerEnable, - NexthopTriggerDelay: uint32(c.Zebra.Config.NexthopTriggerDelay), - MplsLabelRangeSize: uint32(c.Zebra.Config.MplsLabelRangeSize), - SoftwareName: c.Zebra.Config.SoftwareName, + Version: uint32(newConfig.Zebra.Config.Version), + NexthopTriggerEnable: newConfig.Zebra.Config.NexthopTriggerEnable, + NexthopTriggerDelay: uint32(newConfig.Zebra.Config.NexthopTriggerDelay), + MplsLabelRangeSize: uint32(newConfig.Zebra.Config.MplsLabelRangeSize), + SoftwareName: newConfig.Zebra.Config.SoftwareName, }); err != nil { log.Fatalf("failed to set zebra config: %s", err) } |