same change for pton6
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 18 Dec 2014 22:25:04 +0000 (17:25 -0500)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 18 Dec 2014 22:25:16 +0000 (17:25 -0500)
src/lib/misc.c

index 4786c38..1228736 100644 (file)
@@ -338,6 +338,9 @@ int fr_pton6(fr_ipaddr_t *out, char const *value, ssize_t inlen, bool resolve, b
 
        p = strchr(value, '/');
        if (!p) {
+               out->prefix = 128;
+               out->af = AF_INET6;
+
                /*
                 *      Allow '*' as the wildcard address
                 */
@@ -350,9 +353,6 @@ int fr_pton6(fr_ipaddr_t *out, char const *value, ssize_t inlen, bool resolve, b
                        }
                } else if (ip_hton(out, AF_INET6, value, fallback) < 0) return -1;
 
-               out->prefix = 128;
-               out->af = AF_INET6;
-
                return 0;
        }