diff options
Diffstat (limited to 'internal/pkg')
-rw-r--r-- | internal/pkg/table/path.go | 30 |
1 files changed, 9 insertions, 21 deletions
diff --git a/internal/pkg/table/path.go b/internal/pkg/table/path.go index bdeb6ff2..b6080ffa 100644 --- a/internal/pkg/table/path.go +++ b/internal/pkg/table/path.go @@ -133,14 +133,13 @@ type Validation struct { } type Path struct { - info *originInfo - parent *Path - pathAttrs []bgp.PathAttributeInterface - dels []bgp.BGPAttrType - attrsHash uint32 - aslooped bool - reason BestPathReason - receiveVrfId uint32 //VRF in which the path was received. + info *originInfo + parent *Path + pathAttrs []bgp.PathAttributeInterface + dels []bgp.BGPAttrType + attrsHash uint32 + aslooped bool + reason BestPathReason // For BGP Nexthop Tracking, this field shows if nexthop is invalidated by IGP. IsNexthopInvalid bool @@ -168,9 +167,8 @@ func NewPath(source *PeerInfo, nlri bgp.AddrPrefixInterface, isWithdraw bool, pa timestamp: timestamp.Unix(), noImplicitWithdraw: noImplicitWithdraw, }, - IsWithdraw: isWithdraw, - pathAttrs: pattrs, - receiveVrfId: 0, + IsWithdraw: isWithdraw, + pathAttrs: pattrs, } } @@ -334,13 +332,6 @@ func (path *Path) IsIBGP() bool { return (as == path.GetSource().LocalAS) && as != 0 } -func (path *Path) ReceiveVrfId() uint32 { - return path.receiveVrfId -} -func (path *Path) SetReceiveVrfId(vrfId uint32) { - path.receiveVrfId = vrfId -} - // create new PathAttributes func (path *Path) Clone(isWithdraw bool) *Path { return &Path{ @@ -348,7 +339,6 @@ func (path *Path) Clone(isWithdraw bool) *Path { IsWithdraw: isWithdraw, IsNexthopInvalid: path.IsNexthopInvalid, attrsHash: path.attrsHash, - receiveVrfId: path.receiveVrfId, } } @@ -590,7 +580,6 @@ func (path *Path) String() string { if path.IsWithdraw { s.WriteString(", withdraw") } - s.WriteString(fmt.Sprintf(", receiveVrfId: %d", path.receiveVrfId)) s.WriteString(" }") return s.String() } @@ -1149,7 +1138,6 @@ func (p *Path) ToGlobal(vrf *Vrf) *Path { path.delPathAttr(bgp.BGP_ATTR_TYPE_NEXT_HOP) path.setPathAttr(bgp.NewPathAttributeMpReachNLRI(nh.String(), []bgp.AddrPrefixInterface{nlri})) path.IsNexthopInvalid = p.IsNexthopInvalid - path.receiveVrfId = p.receiveVrfId return path } |