From 0ca6a61ca48b9c714ecb0738ddc16e4fa92541a8 Mon Sep 17 00:00:00 2001 From: "Alan T. DeKok" Date: Fri, 13 Dec 2024 10:17:53 -0500 Subject: [PATCH] IPv6 addresses should have a 128 prefix, too --- src/lib/util/cbor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/util/cbor.c b/src/lib/util/cbor.c index a648d3f930fc..ef36effa0f23 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); }