summaryrefslogtreecommitdiffhomepage
path: root/tools/route-server
diff options
context:
space:
mode:
Diffstat (limited to 'tools/route-server')
-rw-r--r--tools/route-server/quagga-rsconfig.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/route-server/quagga-rsconfig.go b/tools/route-server/quagga-rsconfig.go
index a58e8601..b104af8a 100644
--- a/tools/route-server/quagga-rsconfig.go
+++ b/tools/route-server/quagga-rsconfig.go
@@ -34,11 +34,11 @@ func (qt *QuaggaConfig) Config() *bytes.Buffer {
buf.WriteString("hostname bgpd\n")
buf.WriteString("password zebra\n")
- buf.WriteString(fmt.Sprintf("router bgp %d\n", qt.config.NeighborConfig.PeerAs))
+ buf.WriteString(fmt.Sprintf("router bgp %d\n", qt.config.Config.PeerAs))
buf.WriteString(fmt.Sprintf("bgp router-id 192.168.0.%d\n", qt.id))
buf.WriteString(fmt.Sprintf("network 192.168.%d.0/24\n", qt.id))
- buf.WriteString(fmt.Sprintf("neighbor %s remote-as %d\n", qt.serverIP, qt.gobgpConfig.GlobalConfig.As))
- buf.WriteString(fmt.Sprintf("neighbor %s password %s\n", qt.serverIP, qt.config.NeighborConfig.AuthPassword))
+ buf.WriteString(fmt.Sprintf("neighbor %s remote-as %d\n", qt.serverIP, qt.gobgpConfig.Config.As))
+ buf.WriteString(fmt.Sprintf("neighbor %s password %s\n", qt.serverIP, qt.config.Config.AuthPassword))
buf.WriteString("log file /var/log/quagga/bgpd.log")
return buf
}
@@ -47,15 +47,15 @@ func create_config_files(nr int, outputDir string) {
quaggaConfigList := make([]*QuaggaConfig, 0)
gobgpConf := config.Bgp{}
- gobgpConf.Global.GlobalConfig.As = 65000
- gobgpConf.Global.GlobalConfig.RouterId = net.ParseIP("192.168.255.1")
+ gobgpConf.Global.Config.As = 65000
+ gobgpConf.Global.Config.RouterId = "192.168.255.1"
for i := 1; i < nr+1; i++ {
c := config.Neighbor{}
- c.NeighborConfig.PeerAs = 65000 + uint32(i)
- c.NeighborConfig.NeighborAddress = net.ParseIP(fmt.Sprintf("10.0.0.%d", i))
- c.NeighborConfig.AuthPassword = fmt.Sprintf("hoge%d", i)
+ c.Config.PeerAs = 65000 + uint32(i)
+ c.Config.NeighborAddress = fmt.Sprintf("10.0.0.%d", i)
+ c.Config.AuthPassword = fmt.Sprintf("hoge%d", i)
gobgpConf.Neighbors.NeighborList = append(gobgpConf.Neighbors.NeighborList, c)
q := NewQuaggaConfig(i, &gobgpConf.Global, &c, net.ParseIP("10.0.255.1"))