From fa387c90650613bceaca6c6c90c8744405988f8c Mon Sep 17 00:00:00 2001 From: Eiichiro Watanabe Date: Tue, 13 Nov 2018 14:41:52 +0900 Subject: Fix Statistics Report in BMP --- pkg/server/bmp.go | 2 +- pkg/server/server.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'pkg') 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) } -- cgit v1.2.3