]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
"localhost" is a valid host name
authorAlan T. DeKok <aland@freeradius.org>
Wed, 18 Nov 2015 16:14:02 +0000 (11:14 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 18 Nov 2015 16:14:02 +0000 (11:14 -0500)
src/lib/misc.c

index 91184c90e15d3ae1d08a7894e9400b5c7e3f15fc..5ef00fe4dd1ed7273bf9fbc1454842b53a382ce2 100644 (file)
@@ -565,12 +565,13 @@ int fr_pton_port(fr_ipaddr_t *out, uint16_t *port_out, char const *value, ssize_
         *      Host, IPv4 or IPv6 with no port
         */
        q = memchr(p, ':', len);
-       if (!q || !memchr(p, '.', len)) return fr_pton(out, p, len, af, resolve);
+       if (!q) return fr_pton(out, p, len, af, resolve);
 
        /*
         *      IPv4 or host, with port
         */
        if (fr_pton(out, p, (q - p), af, resolve) < 0) return -1;
+
 do_port:
        /*
         *      Valid ports are a maximum of 5 digits, so if the