summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--server/server.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/server/server.go b/server/server.go
index 7935d0fc..b2279ba4 100644
--- a/server/server.go
+++ b/server/server.go
@@ -228,7 +228,13 @@ func (server *BgpServer) Serve() {
select {
case c := <-server.rpkiConfigCh:
if len(c.RpkiServerList) > 0 {
- url := fmt.Sprintf("%s:%d", c.RpkiServerList[0].RpkiServerConfig.Address, c.RpkiServerList[0].RpkiServerConfig.Port)
+ var url string
+ if c.RpkiServerList[0].RpkiServerConfig.Address.To16() == nil {
+ url = fmt.Sprintf("%s", c.RpkiServerList[0].RpkiServerConfig.Address)
+ } else {
+ url = fmt.Sprintf("[%s]", c.RpkiServerList[0].RpkiServerConfig.Address)
+ }
+ url += fmt.Sprintf(":%d", c.RpkiServerList[0].RpkiServerConfig.Port)
server.roaClient, _ = newROAClient(url)
}
case rmsg := <-server.roaClient.recieveROA():