Commit d21051d6 authored by Erick Hitter's avatar Erick Hitter

Fix IPv6 address when using prefix

parent 3ca508e8
...@@ -10,6 +10,7 @@ import ( ...@@ -10,6 +10,7 @@ import (
"net/http" "net/http"
"net/url" "net/url"
"os" "os"
"strings"
) )
var ( var (
...@@ -86,6 +87,7 @@ func main() { ...@@ -86,6 +87,7 @@ func main() {
if ipv6, network, err := net.ParseCIDR(ipMask); usePrefix && err == nil { if ipv6, network, err := net.ParseCIDR(ipMask); usePrefix && err == nil {
ipv6String = network.String() ipv6String = network.String()
ipv6String = strings.Replace(ipv6String, "/64", "1", 1)
} else { } else {
ipv6String = ipv6.String() ipv6String = ipv6.String()
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment