summaryrefslogtreecommitdiffhomepage
path: root/config
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-08-26 18:15:03 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-08-26 18:15:03 +0900
commiteef1fc0a7529a2ee12c822af1b393906cd114ef9 (patch)
treed3ea1183f2f3d162b59b0c3197a8969dbcd6aaf6 /config
parent982a5b448f5ba99033911cdcaeebeeb8c2ed81fa (diff)
add RemoteRouterId to config.NeighborState
Stop using config.NeighborState's Description in a hacky way for the remote Router Id. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'config')
-rw-r--r--config/bgp_configs.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/config/bgp_configs.go b/config/bgp_configs.go
index c2353c8f..7125db4c 100644
--- a/config/bgp_configs.go
+++ b/config/bgp_configs.go
@@ -2512,6 +2512,8 @@ type NeighborState struct {
Flops uint32 `mapstructure:"flops"`
// original -> gobgp:neighbor-interface
NeighborInterface string `mapstructure:"neighbor-interface"`
+ // original -> gobgp:remote-router-id
+ RemoteRouterId string `mapstructure:"remote-router-id"`
}
func (lhs *NeighborState) Equal(rhs *NeighborState) bool {
@@ -2589,6 +2591,9 @@ func (lhs *NeighborState) Equal(rhs *NeighborState) bool {
if lhs.NeighborInterface != rhs.NeighborInterface {
return false
}
+ if lhs.RemoteRouterId != rhs.RemoteRouterId {
+ return false
+ }
return true
}