summaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-08-21 11:31:42 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-08-21 11:31:42 +0900
commit998354dbb0dc211c9ead195a28a20fcc072a22ed (patch)
treee6642425f3cf22b97aa6a70ed928b13dc31e1ac2 /server
parent13243a07034fc3bc2e3dc6c86a7bb4f43d469083 (diff)
server: fix rpki ipv6 address connectivity
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'server')
-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():