Commit 36e13de
authored
grpclb: replace net.IP with netip.Addr (#8918)
Contributes to #8884
This PR replaces deprecated `net.IP` usage with the modern `netip.Addr`
API in two packages:
- **grpclb**: Replace `net.IP(s.IpAddress).String()` with
`netip.AddrFromSlice()` in `processServerList`, adding proper error
handling for invalid IP addresses instead of silently producing `"?"`
from `net.IP.String()`.
Note: `x509.Certificate.IPAddresses` fields in test files
(`internal/credentials/xds/handshake_info_test.go`,
`security/advancedtls/crl_test.go`) are typed as `[]net.IP` by the
standard library, so those cannot be migrated. The xds/server and
xds/xdsclient packages are being addressed in #8909.
RELEASE NOTES: N/A1 parent 7f78342 commit 36e13de
1 file changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
85 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
86 | 92 | | |
87 | 93 | | |
88 | 94 | | |
| |||
0 commit comments