From 6180ffb7106e3673e4da5a2d2ce1f87612462721 Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Wed, 12 Aug 2015 13:16:58 +0900 Subject: support rpki validation Signed-off-by: FUJITA Tomonori --- table/path.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'table/path.go') diff --git a/table/path.go b/table/path.go index b3a84d9d..8025a63a 100644 --- a/table/path.go +++ b/table/path.go @@ -36,6 +36,7 @@ type Path struct { medSetByTargetNeighbor bool timestamp time.Time NoImplicitWithdraw bool + Validation config.RpkiValidationResultType } func NewPath(source *PeerInfo, nlri bgp.AddrPrefixInterface, isWithdraw bool, pattrs []bgp.PathAttributeInterface, medSetByTargetNeighbor bool, timestamp time.Time, noImplicitWithdraw bool) *Path { @@ -156,6 +157,7 @@ func (path *Path) ToApiStruct() *api.Path { Pattrs: pattrs, Age: int64(time.Now().Sub(path.timestamp).Seconds()), IsWithdraw: path.IsWithdraw, + Validation: int32(path.Validation), } } @@ -189,7 +191,9 @@ func (path *Path) Clone(isWithdraw bool) *Path { newPathAttrs[i] = v } - return NewPath(path.source, nlri, isWithdraw, newPathAttrs, false, path.timestamp, path.NoImplicitWithdraw) + p := NewPath(path.source, nlri, isWithdraw, newPathAttrs, false, path.timestamp, path.NoImplicitWithdraw) + p.Validation = path.Validation + return p } func (path *Path) GetRouteFamily() bgp.RouteFamily { -- cgit v1.2.3