Alarig Le Lay
c939c34899
Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Alarig Le Lay <alarig@swordarmor.fr>
30 lines
717 B
Diff
30 lines
717 B
Diff
diff --git a/proto/rpki/transport.c b/proto/rpki/transport.c
|
|
index 182667be..9dcb7c5c 100644
|
|
--- a/proto/rpki/transport.c
|
|
+++ b/proto/rpki/transport.c
|
|
@@ -26,7 +26,6 @@
|
|
static ip_addr
|
|
rpki_hostname_autoresolv(const char *host)
|
|
{
|
|
- ip_addr addr = {};
|
|
struct addrinfo *res;
|
|
struct addrinfo hints = {
|
|
.ai_family = AF_UNSPEC,
|
|
@@ -44,12 +43,10 @@ rpki_hostname_autoresolv(const char *host)
|
|
return IPA_NONE;
|
|
}
|
|
|
|
- sockaddr sa = {
|
|
- .sa = *res->ai_addr,
|
|
- };
|
|
-
|
|
+ ip_addr addr = IPA_NONE;
|
|
uint unused;
|
|
- sockaddr_read(&sa, res->ai_family, &addr, NULL, &unused);
|
|
+
|
|
+ sockaddr_read((sockaddr *) res->ai_addr, res->ai_family, &addr, NULL, &unused);
|
|
|
|
freeaddrinfo(res);
|
|
return addr;
|
|
|