diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-01-17 06:16:33 -0800 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-01-17 06:21:23 -0800 |
commit | f4c409941848b72ba5b162405dc5022d76fcc59f (patch) | |
tree | 03d378ab66b07b94ff7473d2e000be44d71a28e6 /server/rpki.go | |
parent | 1e564f2d3085e394c0983627ea6fcc95df49a50d (diff) |
update rpki monitor API
- handle withdraw
- added some new info (peer address, timestamp, aspath attribute)
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'server/rpki.go')
-rw-r--r-- | server/rpki.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/server/rpki.go b/server/rpki.go index ed4af2ea..6a205aa3 100644 --- a/server/rpki.go +++ b/server/rpki.go @@ -462,12 +462,17 @@ func (c *roaManager) validate(pathList []*table.Path, isMonitor bool) []*api.ROA return apiRoaList }() rr := &api.ROAResult{ + Address: path.GetSource().Address.String(), + Timestamp: path.GetTimestamp().Unix(), OriginAs: path.GetSourceAs(), Prefix: path.GetNlri().String(), OldResult: api.ROAResult_ValidationResult(path.Validation().ToInt()), NewResult: api.ROAResult_ValidationResult(r.ToInt()), Roas: apiRoaList, } + if b := path.GetAsPath(); b != nil { + rr.AspathAttr, _ = b.Serialize() + } results = append(results, rr) } path.SetValidation(config.RpkiValidationResultType(r)) |