Should be AF_UNSPEC, because we don't *know* what type of client IP we'll be parsing
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 11 Sep 2015 12:58:26 +0000 (13:58 +0100)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 11 Sep 2015 13:00:32 +0000 (14:00 +0100)
Length should be -1.

src/main/client.c

index 832f12a..00229d0 100644 (file)
@@ -950,7 +950,7 @@ RADCLIENT *client_afrom_cs(TALLOC_CTX *ctx, CONF_SECTION *cs, bool in_server, bo
                        goto error;
                }
 #endif
-               if (fr_pton(&c->ipaddr, name2, 0, true, true) < 0) {
+               if (fr_pton(&c->ipaddr, name2, -1, AF_UNSPEC, true) < 0) {
                        cf_log_err_cs(cs, "Failed parsing client name \"%s\" as ip address or hostname: %s", name2,
                                      fr_strerror());
                        goto error;