Commit cb531cc
authored
Append IPv6 address to localIPs (#63)
* Appends loadbalancer v6 addr to localIPs
We were already appending the load balancer v4 address to the localIPs variable
so that uuid-annotator would recognize the non-local, public address of the
machine as "local" and not reject it. This change just adds the IPv6 address,
too, since VMs now support both IPv4 and IPv6.
Additionally, this commit removes the redundant call to parseCIDR(), and just
uses the output from a previous invocation of that same function.
* Appends IPv6 address to localIPs in unit test
Additionally, converts the v4 address to a 4 byte representation, which is
apparently the representation of net.IPNet.IP as returned by net.ParseCIDR().
This could be error prone? Maybe we shouldn't be using reflect.DeepEqual() for
comparing slices of IP addresses, since the underlying representation can cause
DeepEqual() to fail, even when the addresses are actually the same.1 parent a9f9600 commit cb531cc
2 files changed
+7
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
| 134 | + | |
138 | 135 | | |
| 136 | + | |
139 | 137 | | |
140 | 138 | | |
141 | 139 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
292 | | - | |
| 292 | + | |
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
| |||
0 commit comments