From fddfcd9e42ec80eeaf1eb3bbdbf2fde10d74e3ce Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Sat, 29 Aug 2015 12:41:12 +0900 Subject: [PATCH] gobgp: mrt inject should not add nexthop attribute mrt dump file should include nexthop attribute Signed-off-by: FUJITA Tomonori --- gobgp/mrt.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/gobgp/mrt.go b/gobgp/mrt.go index e20bf999..bfbed87a 100644 --- a/gobgp/mrt.go +++ b/gobgp/mrt.go @@ -280,15 +280,9 @@ func injectMrt(r string, filename string, count int) error { fmt.Printf("invalid peer index: %d (PEER_INDEX_TABLE has only %d peers)\n", e.PeerIndex, len(peers)) os.Exit(1) } - nexthop := peers[e.PeerIndex].IpAddress.String() if rf == bgp.RF_IPv4_UC { path.Nlri, _ = nlri.Serialize() - n, _ := bgp.NewPathAttributeNextHop(nexthop).Serialize() - path.Pattrs = append(path.Pattrs, n) - } else { - mpreach, _ := bgp.NewPathAttributeMpReachNLRI(nexthop, []bgp.AddrPrefixInterface{nlri}).Serialize() - path.Pattrs = append(path.Pattrs, mpreach) } for _, p := range e.PathAttributes {