Skip to content

Commit

Permalink
compute: used net.IP.Equal vs bytes.Equal for IP comparison (#12279
Browse files Browse the repository at this point in the history
…) (#20241)

[upstream:43b84b7308128de70332e50ff85c5f3713f66c1b]

Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician authored Nov 8, 2024
1 parent f41b8bb commit 0a13ab7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .changelog/12279.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:none

```
3 changes: 1 addition & 2 deletions google/services/compute/resource_compute_forwarding_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
package compute

import (
"bytes"
"context"
"fmt"
"log"
Expand Down Expand Up @@ -89,7 +88,7 @@ func InternalIpDiffSuppress(_, old, new string, _ *schema.ResourceData) bool {
addr_equality = true
} else {
// old and new are IP addresses
addr_equality = bytes.Equal(addr_old, addr_new)
addr_equality = net.IP.Equal(addr_old, addr_new)
}
}

Expand Down

0 comments on commit 0a13ab7

Please sign in to comment.