summaryrefslogtreecommitdiffhomepage
path: root/table/path.go
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2015-10-01 21:30:04 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-10-02 03:30:29 +0900
commit94836fe9a9e247361eb80d16e095c736732a7c61 (patch)
tree92e32b1986688f2f8ea7ce96f021b21a8e87cf29 /table/path.go
parent94b9f27c89d050c80183514986edebc9f6c8361f (diff)
cli: add command to show accepted/rejected routes
$ gobgp neighbor <remote addr> accepted $ gobgp neighbor <remote addr> rejected Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
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,
})
}