heimdal/ipv6_loopbacks_fix.patch
2014-06-27 09:53:56 -06:00

36 lines
1,010 B
Diff

From d6eecd38430dc9fceacd6eeea19880d2f6c555d3 Mon Sep 17 00:00:00 2001
From: Ken Dreyer <ktdreyer@ktdreyer.com>
Date: Wed, 16 Oct 2013 15:57:55 -0600
Subject: [PATCH] Fedora: ipv6 loopbacks fix
---
lib/krb5/addr_families.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lib/krb5/addr_families.c b/lib/krb5/addr_families.c
index 10b1024..981bbeb 100644
--- a/lib/krb5/addr_families.c
+++ b/lib/krb5/addr_families.c
@@ -1161,6 +1161,7 @@ krb5_parse_address(krb5_context context,
{
int i, n;
struct addrinfo *ai, *a;
+ struct addrinfo hint;
int error;
int save_errno;
@@ -1180,7 +1181,10 @@ krb5_parse_address(krb5_context context,
}
}
- error = getaddrinfo (string, NULL, NULL, &ai);
+ // if not parsed as numeric address, do a name lookup
+ memset(&hint, 0x00, sizeof(hint));
+ hint.ai_family = AF_UNSPEC;
+ error = getaddrinfo (string, NULL, &hint, &ai);
if (error) {
krb5_error_code ret2;
save_errno = errno;
--
1.8.3.1