From: Alan T. DeKok Date: Mon, 26 Apr 2021 22:57:10 +0000 (-0400) Subject: we only need "continuation", so call it that. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0992fccdafcdfb4f9d411786074186a6553baee2;p=thirdparty%2Ffreeradius-server.git we only need "continuation", so call it that. at some point later we can add more flags, if we so care --- diff --git a/src/lib/util/dict.h b/src/lib/util/dict.h index f5d68b42ad4..38a9cdc4aa1 100644 --- a/src/lib/util/dict.h +++ b/src/lib/util/dict.h @@ -208,9 +208,9 @@ typedef struct { */ typedef struct { uint32_t pen; //!< Private enterprise number. + bool continuation; //!< we only have one flag for now, for WiMAX size_t type; //!< Length of type data size_t length; //!< Length of length data - size_t flags; //!< Vendor flags. char const *name; //!< Vendor name. } fr_dict_vendor_t; diff --git a/src/lib/util/dict_tokenize.c b/src/lib/util/dict_tokenize.c index b4a0fea2dd6..60b2f2cc373 100644 --- a/src/lib/util/dict_tokenize.c +++ b/src/lib/util/dict_tokenize.c @@ -1541,7 +1541,7 @@ static int dict_read_process_vendor(fr_dict_t *dict, char **argv, int argc) mutable = UNCONST(fr_dict_vendor_t *, dv); mutable->type = type; mutable->length = length; - mutable->flags = continuation; + mutable->continuation = continuation; return 0; } diff --git a/src/protocols/radius/decode.c b/src/protocols/radius/decode.c index 4b39ee8234a..91951df2ccc 100644 --- a/src/protocols/radius/decode.c +++ b/src/protocols/radius/decode.c @@ -939,7 +939,7 @@ static ssize_t CC_HINT(nonnull) decode_vsa(TALLOC_CTX *ctx, fr_dcursor_t *curso /* * WiMAX craziness */ - if (dv->flags) { + if (dv->continuation) { ret = decode_wimax(ctx, cursor, dict, vendor_da, data, attr_len, packet_len, packet_ctx); return ret; } diff --git a/src/protocols/radius/encode.c b/src/protocols/radius/encode.c index efd521b2597..e215bb33d42 100644 --- a/src/protocols/radius/encode.c +++ b/src/protocols/radius/encode.c @@ -1127,7 +1127,7 @@ static ssize_t encode_vendor(fr_dbuff_t *dbuff, * done. */ if (da_stack->da[depth + 1]) { - if (dv && dv->flags) { + if (dv && dv->continuation) { return encode_wimax(dbuff, da_stack, depth, cursor, encode_ctx); } @@ -1145,7 +1145,7 @@ static ssize_t encode_vendor(fr_dbuff_t *dbuff, while ((vp = fr_dcursor_current(&child_cursor)) != NULL) { fr_proto_da_stack_build(da_stack, vp->da); - if (dv && dv->flags) { + if (dv && dv->continuation) { slen = encode_wimax(&work_dbuff, da_stack, depth, &child_cursor, encode_ctx); } else { slen = encode_vendor_attr(&work_dbuff, da_stack, depth, &child_cursor, encode_ctx);