mirror of
https://github.com/osrg/gobgp.git
synced 2024-05-11 05:55:10 +00:00
gobgp: mrt inject should not add nexthop attribute
mrt dump file should include nexthop attribute Signed-off-by: FUJITA Tomonori <[email protected]>
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user