Skip to content

Commit 3911e25

Browse files
wyardleyzeleena
authored andcommitted
compute: used net.IP.Equal vs bytes.Equal for IP comparison (GoogleCloudPlatform#12279)
1 parent 2a53ce3 commit 3911e25

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mmv1/templates/terraform/constants/compute_forwarding_rule.go.tmpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func InternalIpDiffSuppress(_, old, new string, _ *schema.ResourceData) bool {
5151
addr_equality = true
5252
} else {
5353
// old and new are IP addresses
54-
addr_equality = bytes.Equal(addr_old, addr_new)
54+
addr_equality = net.IP.Equal(addr_old, addr_new)
5555
}
5656
}
5757

@@ -64,4 +64,4 @@ func InternalIpDiffSuppress(_, old, new string, _ *schema.ResourceData) bool {
6464
}
6565

6666
return addr_equality && netmask_equality
67-
}
67+
}

0 commit comments

Comments
 (0)