diff options
author | Naoto Hanaue <hanaue.naoto@po.ntts.co.jp> | 2016-02-17 11:13:46 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-02-19 21:14:59 -0800 |
commit | b67befc30abb79bd6c70fbb96437ae6e90cfb274 (patch) | |
tree | 4fdb7bb854091b3f0321e6b10898e71277fe5e83 /table/path.go | |
parent | 496ce6cd0873b492df8190ed2d010a87def9b5e3 (diff) |
ops: maintenance of two-way route exchange
Diffstat (limited to 'table/path.go')
-rw-r--r-- | table/path.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/table/path.go b/table/path.go index 375ad1af..9ed5b78b 100644 --- a/table/path.go +++ b/table/path.go @@ -52,6 +52,7 @@ type originInfo struct { noImplicitWithdraw bool validation config.RpkiValidationResultType isFromZebra bool + isFromOps bool key string uuid []byte eor bool @@ -68,7 +69,7 @@ type Path struct { filtered map[string]PolicyDirection } -func NewPath(source *PeerInfo, nlri bgp.AddrPrefixInterface, isWithdraw bool, pattrs []bgp.PathAttributeInterface, timestamp time.Time, noImplicitWithdraw bool) *Path { +func NewPath(source *PeerInfo, nlri bgp.AddrPrefixInterface, isWithdraw bool, pattrs []bgp.PathAttributeInterface, timestamp time.Time, noImplicitWithdraw bool, isFromOps bool) *Path { if !isWithdraw && pattrs == nil { log.WithFields(log.Fields{ "Topic": "Table", @@ -84,6 +85,7 @@ func NewPath(source *PeerInfo, nlri bgp.AddrPrefixInterface, isWithdraw bool, pa source: source, timestamp: timestamp, noImplicitWithdraw: noImplicitWithdraw, + isFromOps: isFromOps, }, IsWithdraw: isWithdraw, pathAttrs: pattrs, @@ -99,7 +101,7 @@ func NewEOR(family bgp.RouteFamily) *Path { nlri: nlri, eor: true, }, - filtered: make(map[string]PolicyDirection), + filtered: make(map[string]PolicyDirection), } } @@ -240,6 +242,7 @@ func (path *Path) ToApiStruct(id string) *api.Path { SourceAsn: path.OriginInfo().source.AS, SourceId: path.OriginInfo().source.ID.String(), Stale: path.IsStale(), + IsFromOps: path.OriginInfo().isFromOps, } } |