Skip to content

Commit 0a13ab7

Browse files
compute: used net.IP.Equal vs bytes.Equal for IP comparison (#12279) (#20241)
[upstream:43b84b7308128de70332e50ff85c5f3713f66c1b] Signed-off-by: Modular Magician <[email protected]>
1 parent f41b8bb commit 0a13ab7

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.changelog/12279.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:none
2+
3+
```

google/services/compute/resource_compute_forwarding_rule.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
package compute
1919

2020
import (
21-
"bytes"
2221
"context"
2322
"fmt"
2423
"log"
@@ -89,7 +88,7 @@ func InternalIpDiffSuppress(_, old, new string, _ *schema.ResourceData) bool {
8988
addr_equality = true
9089
} else {
9190
// old and new are IP addresses
92-
addr_equality = bytes.Equal(addr_old, addr_new)
91+
addr_equality = net.IP.Equal(addr_old, addr_new)
9392
}
9493
}
9594

0 commit comments

Comments
 (0)