diff options
author | Maximilian <maxi.rostock@outlook.de> | 2023-09-03 17:03:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-03 15:03:27 +0000 |
commit | c42c0e7ceb67d4c35d41ad359014fe3542f532f5 (patch) | |
tree | 47ae4d2c42e7399bd1aa4179d05a32e44e13e9e2 | |
parent | 51185381797a6309c5f579d4de6d8ba4dd9e1e76 (diff) |
lib/connections: Fix WANAddresses returning only unspecified IPs (ref #9010) (#9073)
Avoids taking the address of the same variable twice.
-rw-r--r-- | lib/connections/tcp_listen.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/connections/tcp_listen.go b/lib/connections/tcp_listen.go index da0830d0f1..242bcfeab6 100644 --- a/lib/connections/tcp_listen.go +++ b/lib/connections/tcp_listen.go @@ -178,10 +178,10 @@ func (t *tcpListener) WANAddresses() []*url.URL { // For every address with a specified IP, add one without an IP, // just in case the specified IP is still internal (router behind DMZ). if len(addr.IP) != 0 && !addr.IP.IsUnspecified() { - uri = *t.uri + zeroUri := *t.uri addr.IP = nil - uri.Host = addr.String() - uris = append(uris, &uri) + zeroUri.Host = addr.String() + uris = append(uris, &zeroUri) } } } |