From: Arran Cudbard-Bell Date: Thu, 18 Dec 2014 22:25:04 +0000 (-0500) Subject: same change for pton6 X-Git-Tag: release_3_0_7~430 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=933443073577bbc4066add9a48ffae15d6b741e6;p=thirdparty%2Ffreeradius-server.git same change for pton6 --- diff --git a/src/lib/misc.c b/src/lib/misc.c index 4786c385c18..1228736f7ce 100644 --- a/src/lib/misc.c +++ b/src/lib/misc.c @@ -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; }