summaryrefslogtreecommitdiffhomepage
path: root/server/server.go
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2016-03-13 04:33:43 +0900
committerISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2016-03-17 10:44:43 +0900
commit304523e48aab7aa7bb0063f63ed61de84a6d0b42 (patch)
tree3cb9f8d07e27c0d18779c562665a5cb8d6924791 /server/server.go
parentb65dd149f03d099dc9023db9e2277f8abd90a29b (diff)
server: add missing api.Global field
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'server/server.go')
-rw-r--r--server/server.go20
1 files changed, 19 insertions, 1 deletions
diff --git a/server/server.go b/server/server.go
index 336a2b0e..fc60ef63 100644
--- a/server/server.go
+++ b/server/server.go
@@ -1678,6 +1678,15 @@ func (server *BgpServer) handleModConfig(grpcReq *GrpcRequest) error {
if id == nil {
return fmt.Errorf("invalid router-id format: %s", g.RouterId)
}
+ families := make([]config.AfiSafi, 0, len(g.Families))
+ for _, f := range g.Families {
+ families = append(families, config.AfiSafi{
+ Config: config.AfiSafiConfig{
+ AfiSafiName: config.AfiSafiType(bgp.RouteFamily(f).String()),
+ Enabled: true,
+ },
+ })
+ }
c := config.Bgp{
Global: config.Global{
Config: config.GlobalConfig{
@@ -1685,7 +1694,16 @@ func (server *BgpServer) handleModConfig(grpcReq *GrpcRequest) error {
RouterId: g.RouterId,
},
ListenConfig: config.ListenConfig{
- Port: g.ListenPort,
+ Port: g.ListenPort,
+ LocalAddressList: g.ListenAddresses,
+ },
+ MplsLabelRange: config.MplsLabelRange{
+ MinLabel: g.MplsLabelMin,
+ MaxLabel: g.MplsLabelMax,
+ },
+ AfiSafis: families,
+ Collector: config.Collector{
+ Enabled: g.Collector,
},
},
}