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