summaryrefslogtreecommitdiffhomepage
path: root/gobgpd
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 /gobgpd
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 'gobgpd')
-rw-r--r--gobgpd/main.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/gobgpd/main.go b/gobgpd/main.go
index f1697715..4b4b5047 100644
--- a/gobgpd/main.go
+++ b/gobgpd/main.go
@@ -267,19 +267,19 @@ func main() {
updatePolicy = updatePolicy || u
}
for i, p := range added {
- log.Infof("Peer %v is added", p.Config.NeighborAddress)
+ log.Infof("Peer %v is added", p.State.NeighborAddress)
if err := bgpServer.AddNeighbor(&added[i]); err != nil {
log.Warn(err)
}
}
for i, p := range deleted {
- log.Infof("Peer %v is deleted", p.Config.NeighborAddress)
+ log.Infof("Peer %v is deleted", p.State.NeighborAddress)
if err := bgpServer.DeleteNeighbor(&deleted[i]); err != nil {
log.Warn(err)
}
}
for i, p := range updated {
- log.Infof("Peer %v is updated", p.Config.NeighborAddress)
+ log.Infof("Peer %v is updated", p.State.NeighborAddress)
u, err := bgpServer.UpdateNeighbor(&updated[i])
if err != nil {
log.Warn(err)