summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/tftpsubs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/common/tftpsubs.c b/common/tftpsubs.c
index a796bec..8c999f6 100644
--- a/common/tftpsubs.c
+++ b/common/tftpsubs.c
@@ -308,7 +308,9 @@ set_sock_addr(char *host,union sock_addr *s, char **name)
memset(&hints, 0, sizeof(hints));
hints.ai_family = s->sa.sa_family;
- hints.ai_flags = AI_CANONNAME;
+ hints.ai_flags = AI_CANONNAME | AI_ADDRCONFIG;
+ hints.ai_socktype = SOCK_DGRAM;
+ hints.ai_protocol = IPPROTO_UDP;
err = getaddrinfo(strip_address(host), NULL, &hints, &addrResult);
if (err)
return err;