summaryrefslogtreecommitdiffhomepage
path: root/server/server_test.go
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2016-08-03 04:27:33 +0000
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2017-04-04 22:07:46 +0900
commitbba54bdaa14c1a4c13245548757b38a89531fd9b (patch)
treeee8b87c207dc489d64f0a6e55c2bca0ede3f20bf /server/server_test.go
parent00f8406cb6a207341ea4f68a8fa294f31eb7bc7b (diff)
skip asn negotiation for BGP unnumbered peers
since BGP unnumbered peers are typically trusted, skip asn negotiation for easy configuration. from configuration file: ```toml [[neighbors]] [[neighbors.config]] neighbor-interface = "eth0" ``` from cli: ``` $ gobgp neighbor add interface eth0 ``` Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'server/server_test.go')
-rw-r--r--server/server_test.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/server_test.go b/server/server_test.go
index 3c343b9e..8f5fcc4d 100644
--- a/server/server_test.go
+++ b/server/server_test.go
@@ -185,9 +185,11 @@ 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)
p := NewPeer(
&config.Global{Config: config.GlobalConfig{As: myAs}},
- &config.Neighbor{Config: config.NeighborConfig{PeerAs: as, NeighborAddress: address}},
+ nConf,
rib,
&table.RoutingPolicy{})
for _, f := range rib.GetRFlist() {