From e541ede1b5e4d08aaa3fffd1ee13744cc1b69c59 Mon Sep 17 00:00:00 2001 From: Satoshi Fujimoto Date: Tue, 3 Oct 2017 14:27:58 +0900 Subject: config: Pass Global Config to SetDefaultNeighborConfig In neighbor config, there are some parameters whose default value can be changed depending on the global config. This commit modifies the argument of config.SetDefaultNeighborConfigValues() to pass the global config. It enables to change the default settings of neighbor depending on the global config. Signed-off-by: Satoshi Fujimoto --- server/server_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'server/server_test.go') diff --git a/server/server_test.go b/server/server_test.go index ac762176..bb9e7ff1 100644 --- a/server/server_test.go +++ b/server/server_test.go @@ -200,7 +200,8 @@ func TestNumGoroutineWithAddDeleteNeighbor(t *testing.T) { func newPeerandInfo(myAs, as uint32, address string, rib *table.TableManager) (*Peer, *table.PeerInfo) { nConf := &config.Neighbor{Config: config.NeighborConfig{PeerAs: as, NeighborAddress: address}} - config.SetDefaultNeighborConfigValues(nConf, myAs) + gConf := &config.Global{Config: config.GlobalConfig{As: myAs}} + config.SetDefaultNeighborConfigValues(nConf, gConf) policy := table.NewRoutingPolicy() policy.Reset(&config.RoutingPolicy{}, nil) p := NewPeer( -- cgit v1.2.3