summaryrefslogtreecommitdiffhomepage
path: root/table/path.go
diff options
context:
space:
mode:
Diffstat (limited to 'table/path.go')
-rw-r--r--table/path.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/table/path.go b/table/path.go
index f90cd06a..82af18c1 100644
--- a/table/path.go
+++ b/table/path.go
@@ -163,7 +163,7 @@ func cloneAsPath(asAttr *bgp.PathAttributeAsPath) *bgp.PathAttributeAsPath {
return bgp.NewPathAttributeAsPath(newASparams)
}
-func (path *Path) UpdatePathAttrs(global *config.Global, peer *config.Neighbor) {
+func (path *Path) UpdatePathAttrs(global *config.Global, peer *config.Neighbor, info *PeerInfo) {
if peer.RouteServer.Config.RouteServerClient {
return
}
@@ -176,7 +176,7 @@ func (path *Path) UpdatePathAttrs(global *config.Global, peer *config.Neighbor)
}
}
- localAddress := net.ParseIP(peer.Transport.State.LocalAddress)
+ localAddress := info.LocalAddress
isZero := func(ip net.IP) bool {
return ip.Equal(net.ParseIP("0.0.0.0")) || ip.Equal(net.ParseIP("::"))
}