summaryrefslogtreecommitdiffhomepage
path: root/table/path.go
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-08-12 13:16:58 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-08-12 13:44:33 +0900
commit6180ffb7106e3673e4da5a2d2ce1f87612462721 (patch)
tree74646c52142ccda5b34231207cc741f8288f38ec /table/path.go
parentc2f5b1a176a1b7f72658821d057e23414e839718 (diff)
support rpki validation
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'table/path.go')
-rw-r--r--table/path.go6
1 files changed, 5 insertions, 1 deletions
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 {