summaryrefslogtreecommitdiffhomepage
path: root/table/destination.go
diff options
context:
space:
mode:
authorSatoshi Fujimoto <satoshi.fujimoto7@gmail.com>2017-06-13 14:04:50 +0900
committerSatoshi Fujimoto <satoshi.fujimoto7@gmail.com>2017-06-16 09:09:47 +0900
commitbe2524ee3e158a0d248d730f727da80bab09aed8 (patch)
treee27c107dc19f448bcfdd325f88cb27d82c406da4 /table/destination.go
parent83684d5e62fb14596aabf03747a8b395543f91bb (diff)
config: Use State to get NeighborAddress instead of Config
By introducing dynamic neighbor feature, GoBGP can have dynamic neighbors, and corresponding Config.NeighboAddress can be empty. This patch sets State.NeighborAddress for all neighbors, and gets the neighbor's address from them. Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
Diffstat (limited to 'table/destination.go')
-rw-r--r--table/destination.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/table/destination.go b/table/destination.go
index 21857e44..af74f8fd 100644
--- a/table/destination.go
+++ b/table/destination.go
@@ -127,7 +127,7 @@ func (i *PeerInfo) String() string {
func NewPeerInfo(g *config.Global, p *config.Neighbor) *PeerInfo {
id := net.ParseIP(string(p.RouteReflector.Config.RouteReflectorClusterId)).To4()
// exclude zone info
- naddr, _ := net.ResolveIPAddr("ip", p.Config.NeighborAddress)
+ naddr, _ := net.ResolveIPAddr("ip", p.State.NeighborAddress)
return &PeerInfo{
AS: p.Config.PeerAs,
LocalAS: g.Config.As,