diff options
Diffstat (limited to 'config/default.go')
-rw-r--r-- | config/default.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/config/default.go b/config/default.go index fe7d547b..21b95758 100644 --- a/config/default.go +++ b/config/default.go @@ -131,8 +131,12 @@ func SetDefaultConfigValues(v *viper.Viper, b *Bgp) error { } } + if !vv.IsSet("neighbor.config.local-as") { + n.Config.LocalAs = b.Global.Config.As + } + if !vv.IsSet("neighbor.config.peer-type") { - if n.Config.PeerAs != b.Global.Config.As { + if n.Config.PeerAs != n.Config.LocalAs { n.Config.PeerType = PEER_TYPE_EXTERNAL } else { n.Config.PeerType = PEER_TYPE_INTERNAL |