summaryrefslogtreecommitdiffhomepage
path: root/config/default.go
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-03-20 23:09:54 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-03-20 23:09:54 +0900
commit8c98546a9d09dbcc99b4d7323de1530a2706e30a (patch)
tree11fae4afbde12efbc4d0581c0cfc005c1ccdd871 /config/default.go
parent53730a4dfd938933b87dec0c5f11a7fdbdbb2a2a (diff)
config: set PeerType default
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'config/default.go')
-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
}