diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2015-09-08 10:57:43 +0900 |
---|---|---|
committer | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2015-09-08 13:13:34 +0900 |
commit | 9298e5eeca78e8bb02ff34b500add622b73b4f5f (patch) | |
tree | 857f7646d93ba770527e61edd76dd1838b440249 /table/path.go | |
parent | 89b904b7417932e78c8c6fea2ad5d8a35891b0a4 (diff) |
*: kill bgp.NLRInfo and bgp.WithdrawnRoute
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
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 } |