diff options
author | Eiichiro Watanabe <a16tochjp@gmail.com> | 2018-11-13 14:41:52 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2018-11-14 19:32:24 +0900 |
commit | fa387c90650613bceaca6c6c90c8744405988f8c (patch) | |
tree | b41edff67b98094e9a8d85710032849f9d7c5671 /pkg/server | |
parent | 99b272438618c33fecc74ae8514c6a10f3de8f8f (diff) |
Fix Statistics Report in BMP
Diffstat (limited to 'pkg/server')
-rw-r--r-- | pkg/server/bmp.go | 2 | ||||
-rw-r--r-- | pkg/server/server.go | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/pkg/server/bmp.go b/pkg/server/bmp.go index 48215628..ea6a9fe6 100644 --- a/pkg/server/bmp.go +++ b/pkg/server/bmp.go @@ -230,7 +230,7 @@ func (b *bmpClient) loop() { if n.State.SessionState != config.SESSION_STATE_ESTABLISHED { continue } - if err := write(bmpPeerStats(bmp.BMP_PEER_TYPE_GLOBAL, 0, 0, n)); err != nil { + if err := write(bmpPeerStats(bmp.BMP_PEER_TYPE_GLOBAL, 0, time.Now().Unix(), n)); err != nil { return false } } diff --git a/pkg/server/server.go b/pkg/server/server.go index 688a8e9f..256105aa 100644 --- a/pkg/server/server.go +++ b/pkg/server/server.go @@ -1607,6 +1607,7 @@ func (s *BgpServer) AddBmp(ctx context.Context, r *api.AddBmpRequest) error { Address: r.Address, Port: r.Port, RouteMonitoringPolicy: config.IntToBmpRouteMonitoringPolicyTypeMap[int(r.Type)], + StatisticsTimeout: uint16(r.StatisticsTimeout), }) }, true) } |