summaryrefslogtreecommitdiffhomepage
path: root/config
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2016-08-03 04:27:33 +0000
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2017-04-04 22:07:46 +0900
commitbba54bdaa14c1a4c13245548757b38a89531fd9b (patch)
treeee8b87c207dc489d64f0a6e55c2bca0ede3f20bf /config
parent00f8406cb6a207341ea4f68a8fa294f31eb7bc7b (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')
-rw-r--r--config/default.go2
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)
}