diff options
author | Eiichiro Watanabe <a16tochjp@gmail.com> | 2018-11-08 15:26:00 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2018-11-09 08:49:36 +0900 |
commit | 345b848330b30e002455715146491ffc5291b025 (patch) | |
tree | 3027cc12658ad32b3c8fe31038b2186ec973d153 | |
parent | 52c6ef31b47792c3aa1011a76739bccf49c4b862 (diff) |
server: Fix some values are all off by one in MRT TABLEDUMP_V2
-rw-r--r-- | pkg/server/mrt.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/server/mrt.go b/pkg/server/mrt.go index fae9b5cc..b4fe30b5 100644 --- a/pkg/server/mrt.go +++ b/pkg/server/mrt.go @@ -137,12 +137,12 @@ func (m *mrtWriter) loop() error { } idx := func(p *table.Path) uint16 { - for i, pconf := range e.Neighbor { - if p.GetSource().Address.String() == pconf.State.NeighborAddress { + for i, peer := range peers { + if peer.IpAddress.String() == p.GetSource().Address.String() { return uint16(i) } } - return uint16(len(e.Neighbor)) + return uint16(len(peers)) } subtype := func(p *table.Path, isAddPath bool) mrt.MRTSubTypeTableDumpv2 { |