Skip to content

Commit

Permalink
IPv6 addresses should have a 128 prefix, too
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed Dec 13, 2024
1 parent 94ceabe commit 0ca6a61
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/util/cbor.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 0ca6a61

Please sign in to comment.