summaryrefslogtreecommitdiffhomepage
path: root/config
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-04-26 01:11:22 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-04-26 07:20:47 +0900
commit21938add9f67de5bea1ac7ccb4b21b24a996437b (patch)
tree59b9dc1376f153d03031bf5c20aeef2cd8f34f89 /config
parentf1e1329dab8183214c9727a80debd2d40d283d93 (diff)
move NeighborPortNumber config to transport.Config
More appropriate. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'config')
-rw-r--r--config/bgp_configs.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/config/bgp_configs.go b/config/bgp_configs.go
index 5edaad2e..7beaeec9 100644
--- a/config/bgp_configs.go
+++ b/config/bgp_configs.go
@@ -1893,6 +1893,9 @@ type TransportConfig struct {
// original -> bgp:local-address
//bgp:local-address's original type is union
LocalAddress string `mapstructure:"local-address"`
+ // original -> gobgp:remote-port
+ //gobgp:remote-port's original type is inet:port-number
+ RemotePort uint16 `mapstructure:"remote-port"`
}
func (lhs *TransportConfig) Equal(rhs *TransportConfig) bool {
@@ -1911,6 +1914,9 @@ func (lhs *TransportConfig) Equal(rhs *TransportConfig) bool {
if lhs.LocalAddress != rhs.LocalAddress {
return false
}
+ if lhs.RemotePort != rhs.RemotePort {
+ return false
+ }
return true
}
@@ -2337,9 +2343,6 @@ type NeighborConfig struct {
// original -> bgp:neighbor-address
//bgp:neighbor-address's original type is inet:ip-address
NeighborAddress string `mapstructure:"neighbor-address"`
- // original -> gobgp:neighbor-port-number
- //gobgp:neighbor-port-number's original type is inet:port-number
- NeighborPortNumber uint16 `mapstructure:"neighbor-port-number"`
}
func (lhs *NeighborConfig) Equal(rhs *NeighborConfig) bool {
@@ -2376,9 +2379,6 @@ func (lhs *NeighborConfig) Equal(rhs *NeighborConfig) bool {
if lhs.NeighborAddress != rhs.NeighborAddress {
return false
}
- if lhs.NeighborPortNumber != rhs.NeighborPortNumber {
- return false
- }
return true
}