summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2017-11-11 16:49:18 (GMT)
committerChristian Pointner <equinox@anytun.org>2017-11-11 16:49:18 (GMT)
commitc5d5d824c507a0f0e6f1f7fe1ca75425966b9245 (patch)
tree49d52f6476da8c8e8afefaa36fbca813ac8a0756
parentecc72df0f17e04c15ea4e031a778d1f49bbcbdfd (diff)
make endpoint test work with more systems
-rw-r--r--satp/security-association_test.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/satp/security-association_test.go b/satp/security-association_test.go
index 0dc316b..78c8997 100644
--- a/satp/security-association_test.go
+++ b/satp/security-association_test.go
@@ -92,7 +92,10 @@ func TestSecurityAssociationEndpointsEqual(t *testing.T) {
global4Num1234, _ := net.ResolveUDPAddr("udp4", "1.2.3.4:1234")
global4Num444, _ := net.ResolveUDPAddr("udp4", "1.2.3.4:444")
local6Num666, _ := net.ResolveUDPAddr("udp6", "[::1]:666")
- local6Name666, _ := net.ResolveUDPAddr("udp6", "localhost:666")
+ local6Name666, err := net.ResolveUDPAddr("udp6", "localhost:666")
+ if err != nil {
+ local6Name666, _ = net.ResolveUDPAddr("udp6", "ip6-localhost:666")
+ }
local6Name1234, _ := net.ResolveUDPAddr("udp6", "localhost:1234")
global6Num666, _ := net.ResolveUDPAddr("udp6", "[2a02::1234:1]:666")
global6Num1234, _ := net.ResolveUDPAddr("udp6", "[2a02::1234:1]:1234")