Skip to content

Commit

Permalink
Allow listen.ipaddr to reference an IPv6-only host
Browse files Browse the repository at this point in the history
In 5452b13, these lines were added
which effectively result in a listen.ipaddr only allowing hostnames to
resolve to IPv4 addresses. With a hostname with only a IPv6 address,
it'll bail with the error message:

radiusd: #### Opening IP addresses and Ports ####
listen {
        type = "auth"
Failed resolving "ipv6.cipherboy.com" to IPv4 address:
    Name or service not known

This directly contradicts the language in the default configuration
file, so support resolving both IPv4-only and IPv6-only hostnames.

Signed-off-by: Alexander Scheel <ascheel@redhat.com>
  • Loading branch information
cipherboy committed Apr 22, 2019
1 parent 7baf813 commit 98510ef
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/lib/misc.c
Expand Up @@ -607,13 +607,6 @@ int fr_pton(fr_ipaddr_t *out, char const *value, ssize_t inlen, int af, bool res
fr_strerror_printf("Invalid address");
return -1;
}

/*
* Fall through to resolving the address, using
* whatever address family they prefer. If they
* don't specify an address family, force IPv4.
*/
if (af == AF_UNSPEC) af = AF_INET;
}

/*
Expand Down

0 comments on commit 98510ef

Please sign in to comment.