summaryrefslogtreecommitdiffhomepage
path: root/config
diff options
context:
space:
mode:
authorSatoshi Fujimoto <satoshi.fujimoto7@gmail.com>2017-09-22 10:29:07 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2017-11-07 21:53:46 +0900
commit9e584acea92ba17a6792d4724efad0e51c118768 (patch)
tree32456e94ed1de8e57a97cf4a38d88ad43ee86680 /config
parent9d90d038a703f9e37e6fae4c1d035e889161a9c4 (diff)
*: Support BGP Confederations (RFC 5065)
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
Diffstat (limited to 'config')
-rw-r--r--config/default.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/config/default.go b/config/default.go
index f69c96aa..0cf1ef8a 100644
--- a/config/default.go
+++ b/config/default.go
@@ -124,6 +124,11 @@ func setDefaultNeighborConfigValuesWithViper(v *viper.Viper, n *Neighbor, g *Glo
if n.Config.LocalAs == 0 {
n.Config.LocalAs = g.Config.As
+ if !g.Confederation.Config.Enabled || n.IsConfederation(g) {
+ n.Config.LocalAs = g.Config.As
+ } else {
+ n.Config.LocalAs = g.Confederation.Config.Identifier
+ }
}
n.State.LocalAs = n.Config.LocalAs