diff options
Diffstat (limited to 'table/path.go')
-rw-r--r-- | table/path.go | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/table/path.go b/table/path.go index eba3340a..386d39c3 100644 --- a/table/path.go +++ b/table/path.go @@ -207,21 +207,12 @@ func (path *Path) MarshalJSON() ([]byte, error) { // create new PathAttributes func (path *Path) Clone(isWithdraw bool) *Path { - nlri := path.nlri - if path.GetRouteFamily() == bgp.RF_IPv4_UC && isWithdraw { - if path.IsWithdraw { - nlri = path.nlri - } else { - nlri = &bgp.WithdrawnRoute{path.nlri.(*bgp.NLRInfo).IPAddrPrefix} - } - } - newPathAttrs := make([]bgp.PathAttributeInterface, len(path.pathAttrs)) for i, v := range path.pathAttrs { newPathAttrs[i] = v } - p := NewPath(path.source, nlri, isWithdraw, newPathAttrs, false, path.timestamp, path.NoImplicitWithdraw) + p := NewPath(path.source, path.nlri, isWithdraw, newPathAttrs, false, path.timestamp, path.NoImplicitWithdraw) p.Validation = path.Validation return p } |