From: Alan T. DeKok Date: Fri, 13 Dec 2024 15:17:53 +0000 (-0500) Subject: IPv6 addresses should have a 128 prefix, too X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ca6a61ca48b9c714ecb0738ddc16e4fa92541a8;p=thirdparty%2Ffreeradius-server.git IPv6 addresses should have a 128 prefix, too --- diff --git a/src/lib/util/cbor.c b/src/lib/util/cbor.c index a648d3f930f..ef36effa0f2 100644 --- a/src/lib/util/cbor.c +++ b/src/lib/util/cbor.c @@ -710,8 +710,8 @@ static ssize_t cbor_decode_ipv6_addr(UNUSED TALLOC_CTX *ctx, fr_value_box_t *vb, slen = cbor_decode_count(&value, CBOR_INTEGER, &work_dbuff); if (slen <= 0) return_slen; - if (value > 128) { - fr_strerror_printf("Invalid IPv6 interface - expected prefix <= 128 got %" PRIu64, value); + if (value != 128) { + fr_strerror_printf("Invalid IPv6 address - expected prefix = 128 got %" PRIu64, value); return -fr_dbuff_used(&work_dbuff); }