summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--config/default.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/config/default.go b/config/default.go
index 103a8084..7c1f9cd8 100644
--- a/config/default.go
+++ b/config/default.go
@@ -75,6 +75,14 @@ func SetDefaultConfigValues(md toml.MetaData, bt *Bgp) error {
}
}
}
+
+ if _, ok := n.attributes["NeighborList.PeerType"]; !ok {
+ if bt.NeighborList[i].PeerAs != bt.Global.As {
+ bt.NeighborList[i].PeerType = PEER_TYPE_EXTERNAL
+ } else {
+ bt.NeighborList[i].PeerType = PEER_TYPE_INTERNAL
+ }
+ }
}
return nil
}