summaryrefslogtreecommitdiffhomepage
path: root/server/server.go
diff options
context:
space:
mode:
authorWataru Ishida <ishida.wataru@lab.ntt.co.jp>2016-10-08 04:51:14 +0000
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-11-04 13:20:03 +0900
commit4bdaf1e64c20ef31614f11d71ca8682bfcbcec22 (patch)
tree7237a60add7a815c2fd15b295460f55ba70106f7 /server/server.go
parenta17832195c5fc42d6d0ec3dd7cc4868694bed88d (diff)
cli: support adding rr-client and rs-client
$ gobgp neighbor add 10.0.0.1 route-reflector-client $ gobgp neighbor add 10.0.0.1 route-reflector-client 1.1.1.1 $ gobgp neighbor add 10.0.0.1 route-server-client Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'server/server.go')
-rw-r--r--server/server.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/server/server.go b/server/server.go
index 17710f11..bcf34bd3 100644
--- a/server/server.go
+++ b/server/server.go
@@ -1675,6 +1675,10 @@ func (server *BgpServer) addNeighbor(c *config.Neighbor) error {
}
}
+ if c.RouteServer.Config.RouteServerClient && c.RouteReflector.Config.RouteReflectorClient {
+ return fmt.Errorf("can't be both route-server-client and route-reflector-client")
+ }
+
if server.bgpConfig.Global.Config.Port > 0 {
for _, l := range server.Listeners(addr) {
if err := SetTcpMD5SigSockopts(l, addr, c.Config.AuthPassword); err != nil {