summaryrefslogtreecommitdiffhomepage
path: root/table/path.go
diff options
context:
space:
mode:
Diffstat (limited to 'table/path.go')
-rw-r--r--table/path.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/table/path.go b/table/path.go
index 8997af67..02b24416 100644
--- a/table/path.go
+++ b/table/path.go
@@ -38,6 +38,7 @@ type Path struct {
NoImplicitWithdraw bool
Validation config.RpkiValidationResultType
IsFromZebra bool
+ Filtered bool
}
func NewPath(source *PeerInfo, nlri bgp.AddrPrefixInterface, isWithdraw bool, pattrs []bgp.PathAttributeInterface, medSetByTargetNeighbor bool, timestamp time.Time, noImplicitWithdraw bool) *Path {
@@ -190,6 +191,7 @@ func (path *Path) ToApiStruct() *api.Path {
Age: int64(time.Now().Sub(path.timestamp).Seconds()),
IsWithdraw: path.IsWithdraw,
Validation: int32(path.Validation),
+ Filtered: path.Filtered,
Rf: rf,
}
}
@@ -200,11 +202,13 @@ func (path *Path) MarshalJSON() ([]byte, error) {
IsWithdraw bool `json:"is_withdraw"`
Nlri bgp.AddrPrefixInterface `json:"nlri"`
Pathattrs []bgp.PathAttributeInterface `json:"pattrs"`
+ Filtered bool `json:"filtered"`
}{
Source: path.source,
IsWithdraw: path.IsWithdraw,
Nlri: path.nlri,
Pathattrs: path.pathAttrs,
+ Filtered: path.Filtered,
})
}