Blame SOURCES/freeradius-listen-ipv6-fix.patch

3a762b
From 98510efd0e2930d8924b47009945a0fb1bd75a29 Mon Sep 17 00:00:00 2001
3a762b
From: Alexander Scheel <ascheel@redhat.com>
3a762b
Date: Mon, 22 Apr 2019 14:38:19 -0400
3a762b
Subject: [PATCH] Allow listen.ipaddr to reference an IPv6-only host
3a762b
3a762b
In 5452b13cefa3b30f1da467ff5d68b3c1aa471188, these lines were added
3a762b
which effectively result in a listen.ipaddr only allowing hostnames to
3a762b
resolve to IPv4 addresses. With a hostname with only a IPv6 address,
3a762b
it'll bail with the error message:
3a762b
3a762b
radiusd: #### Opening IP addresses and Ports ####
3a762b
listen {
3a762b
        type = "auth"
3a762b
Failed resolving "ipv6.cipherboy.com" to IPv4 address:
3a762b
    Name or service not known
3a762b
3a762b
This directly contradicts the language in the default configuration
3a762b
file, so support resolving both IPv4-only and IPv6-only hostnames.
3a762b
3a762b
Signed-off-by: Alexander Scheel <ascheel@redhat.com>
3a762b
---
3a762b
 src/lib/misc.c | 7 -------
3a762b
 1 file changed, 7 deletions(-)
3a762b
3a762b
diff --git a/src/lib/misc.c b/src/lib/misc.c
3a762b
index dff21e33f7..5520d8a0a4 100644
3a762b
--- a/src/lib/misc.c
3a762b
+++ b/src/lib/misc.c
3a762b
@@ -607,13 +607,6 @@ int fr_pton(fr_ipaddr_t *out, char const *value, ssize_t inlen, int af, bool res
3a762b
 			fr_strerror_printf("Invalid address");
3a762b
 			return -1;
3a762b
 		}
3a762b
-
3a762b
-		/*
3a762b
-		 *	Fall through to resolving the address, using
3a762b
-		 *	whatever address family they prefer.  If they
3a762b
-		 *	don't specify an address family, force IPv4.
3a762b
-		 */
3a762b
-		if (af == AF_UNSPEC) af = AF_INET;
3a762b
 	}
3a762b
 
3a762b
 	/*