1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-09-26 05:46:10 -04:00

update ipv6 comparison

This commit is contained in:
v2ray 2016-07-14 14:25:06 +02:00
parent 476b3c68d2
commit 6f998fa18b
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -133,12 +133,22 @@ func (this *ipv6Address) Equals(another Address) bool {
if !ok {
return false
}
for idx, v := range *this {
if anotherIPv6[idx] != v {
return false
}
}
return true
return this[0] == anotherIPv6[0] &&
this[1] == anotherIPv6[1] &&
this[2] == anotherIPv6[2] &&
this[3] == anotherIPv6[3] &&
this[4] == anotherIPv6[4] &&
this[5] == anotherIPv6[5] &&
this[6] == anotherIPv6[6] &&
this[7] == anotherIPv6[7] &&
this[8] == anotherIPv6[8] &&
this[9] == anotherIPv6[9] &&
this[10] == anotherIPv6[10] &&
this[11] == anotherIPv6[11] &&
this[12] == anotherIPv6[12] &&
this[13] == anotherIPv6[13] &&
this[14] == anotherIPv6[14] &&
this[15] == anotherIPv6[15]
}
type domainAddress string