]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
dns labels have their own array decoder
authorAlan T. DeKok <aland@freeradius.org>
Sun, 15 Aug 2021 20:37:30 +0000 (16:37 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 15 Aug 2021 20:41:05 +0000 (16:41 -0400)
src/protocols/dhcpv6/decode.c

index 378ee8ff56ef317642627a940fea6b488c5ccb9c..c95af9ce4814b42421285691af20e27b478e582c 100644 (file)
@@ -116,8 +116,6 @@ static ssize_t decode_value_trampoline(TALLOC_CTX *ctx, fr_dcursor_t *cursor, fr
                                       fr_dict_attr_t const *parent,
                                       uint8_t const *data, size_t const data_len, void *decode_ctx)
 {
-       if (parent->flags.array) return decode_array(ctx, cursor, dict, parent, data, data_len, decode_ctx);
-
        /*
         *      @todo - we might need to limit this to only one DNS label.
         */
@@ -125,6 +123,8 @@ static ssize_t decode_value_trampoline(TALLOC_CTX *ctx, fr_dcursor_t *cursor, fr
                return decode_dns_labels(ctx, cursor, dict, parent, data, data_len, decode_ctx);
        }
 
+       if (parent->flags.array) return decode_array(ctx, cursor, dict, parent, data, data_len, decode_ctx);
+
        return decode_value(ctx, cursor, dict, parent, data, data_len, decode_ctx);
 }