diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2016-08-01 08:11:14 +0000 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-08-02 10:48:58 +0900 |
commit | 1890b4c5ef28fde6cff478a78e1ded3a65badd6b (patch) | |
tree | 332875e27ca4e85c3432c884dd038dc161be7dc3 /config/bgp_configs.go | |
parent | a46e8b6826fe95ff09278d75474faf7a14b5d8b1 (diff) |
config: support unnumbered bgp peering
from configuration file:
```toml
[[neighbors]]
[[neighbors.afi-safis]]
neighbor-interface = "eth0"
peer-as = 65000
```
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'config/bgp_configs.go')
-rw-r--r-- | config/bgp_configs.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/config/bgp_configs.go b/config/bgp_configs.go index 44afcb82..1636073c 100644 --- a/config/bgp_configs.go +++ b/config/bgp_configs.go @@ -2477,6 +2477,8 @@ type NeighborState struct { EstablishedCount uint32 `mapstructure:"established-count"` // original -> gobgp:flops Flops uint32 `mapstructure:"flops"` + // original -> gobgp:neighbor-interface + NeighborInterface string `mapstructure:"neighbor-interface"` } func (lhs *NeighborState) Equal(rhs *NeighborState) bool { @@ -2551,6 +2553,9 @@ func (lhs *NeighborState) Equal(rhs *NeighborState) bool { if lhs.Flops != rhs.Flops { return false } + if lhs.NeighborInterface != rhs.NeighborInterface { + return false + } return true } @@ -2583,6 +2588,8 @@ type NeighborConfig struct { // original -> gobgp:admin-down //gobgp:admin-down's original type is boolean AdminDown bool `mapstructure:"admin-down"` + // original -> gobgp:neighbor-interface + NeighborInterface string `mapstructure:"neighbor-interface"` } func (lhs *NeighborConfig) Equal(rhs *NeighborConfig) bool { @@ -2622,6 +2629,9 @@ func (lhs *NeighborConfig) Equal(rhs *NeighborConfig) bool { if lhs.AdminDown != rhs.AdminDown { return false } + if lhs.NeighborInterface != rhs.NeighborInterface { + return false + } return true } |