summaryrefslogtreecommitdiffhomepage
path: root/table/path.go
diff options
context:
space:
mode:
Diffstat (limited to 'table/path.go')
-rw-r--r--table/path.go7
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,
}
}