diff options
author | Naoto Hanaue <hanaue.naoto@po.ntts.co.jp> | 2015-12-10 18:52:37 +0900 |
---|---|---|
committer | Naoto Hanaue <hanaue.naoto@po.ntts.co.jp> | 2015-12-10 18:52:49 +0900 |
commit | db35c8b954806000abdb7a1c63188ad5948a0714 (patch) | |
tree | b933588adb423665d7abc7ea2263d0d53422181c /server | |
parent | 45ae72282ee5ed3f1d7d6641a5e4f1e8e7444ed2 (diff) |
server: fix bug when you add a global config in grpc
Gobgp does not Initialize RoutingPolicy if GlobalConifig is configured via gRPC, this issue causes received route from Peer not added to GlobalRib.
Diffstat (limited to 'server')
-rw-r--r-- | server/server.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/server/server.go b/server/server.go index c15403ee..c25652ed 100644 --- a/server/server.go +++ b/server/server.go @@ -1322,6 +1322,10 @@ func (server *BgpServer) handleModGlobalConfig(grpcReq *GrpcRequest) error { if err != nil { return err } + p := config.RoutingPolicy{} + if err := server.SetRoutingPolicy(p); err != nil { + log.Fatal(err) + } go func() { server.globalTypeCh <- c.Global }() |