From: Alan T. DeKok Date: Wed, 16 Mar 2022 20:33:56 +0000 (-0400) Subject: limit this to DNS labels X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=10ddb5bc44edc2d3826b377a00acdb3ada87d754;p=thirdparty%2Ffreeradius-server.git limit this to DNS labels --- diff --git a/src/protocols/dhcpv6/decode.c b/src/protocols/dhcpv6/decode.c index f00b4e21f43..b35cd1a830a 100644 --- a/src/protocols/dhcpv6/decode.c +++ b/src/protocols/dhcpv6/decode.c @@ -116,7 +116,9 @@ static ssize_t decode_value_trampoline(TALLOC_CTX *ctx, fr_pair_list_t *out, /* * @todo - we might need to limit this to only one DNS label. */ - if ((parent->type == FR_TYPE_STRING) && !parent->flags.extra && parent->flags.subtype) { + if ((parent->type == FR_TYPE_STRING) && !parent->flags.extra && + ((parent->flags.subtype == FLAG_ENCODE_DNS_LABEL) || + (parent->flags.subtype == FLAG_ENCODE_PARTIAL_DNS_LABEL))) { return decode_dns_labels(ctx, out, parent, data, data_len, decode_ctx); } @@ -572,7 +574,10 @@ static ssize_t decode_option(TALLOC_CTX *ctx, fr_pair_list_t *out, } fr_pair_append(out, vp); - } else if ((da->type == FR_TYPE_STRING) && !da->flags.extra && da->flags.subtype) { + + } else if ((da->type == FR_TYPE_STRING) && !da->flags.extra && + ((da->flags.subtype == FLAG_ENCODE_DNS_LABEL) || + (da->flags.subtype == FLAG_ENCODE_PARTIAL_DNS_LABEL))) { fr_pair_list_t tmp; fr_pair_list_init(&tmp);