diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2016-08-03 04:27:33 +0000 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2017-04-04 22:07:46 +0900 |
commit | bba54bdaa14c1a4c13245548757b38a89531fd9b (patch) | |
tree | ee8b87c207dc489d64f0a6e55c2bca0ede3f20bf /config/default.go | |
parent | 00f8406cb6a207341ea4f68a8fa294f31eb7bc7b (diff) |
skip asn negotiation for BGP unnumbered peers
since BGP unnumbered peers are typically trusted, skip asn negotiation
for easy configuration.
from configuration file:
```toml
[[neighbors]]
[[neighbors.config]]
neighbor-interface = "eth0"
```
from cli:
```
$ gobgp neighbor add interface eth0
```
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'config/default.go')
-rw-r--r-- | config/default.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/config/default.go b/config/default.go index 92c743dd..094afb2b 100644 --- a/config/default.go +++ b/config/default.go @@ -105,6 +105,8 @@ func setDefaultNeighborConfigValuesWithViper(v *viper.Viper, n *Neighbor, asn ui n.Config.PeerType = PEER_TYPE_INTERNAL } + n.State.PeerAs = n.Config.PeerAs + if !v.IsSet("neighbor.timers.config.connect-retry") && n.Timers.Config.ConnectRetry == 0 { n.Timers.Config.ConnectRetry = float64(DEFAULT_CONNECT_RETRY) } |