]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Rename the hard fields
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 9 May 2017 17:26:31 +0000 (13:26 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 9 May 2017 17:26:31 +0000 (13:26 -0400)
92 files changed:
src/include/pair.h
src/include/value.h
src/lib/util/dict.c
src/lib/util/filters.c
src/lib/util/misc.c
src/lib/util/pair.c
src/lib/util/snprintf.c
src/lib/util/snprintf.h
src/lib/util/value.c
src/main/acct.c
src/main/auth.c
src/main/client.c
src/main/listen.c
src/main/pair.c
src/main/process.c
src/main/radclient.c
src/main/radsniff.c
src/main/radsnmp.c
src/main/session.c
src/main/snmp.c
src/main/soh.c
src/main/stats.c
src/main/tls/cache.c
src/main/tls/ocsp.c
src/main/tls/session.c
src/main/unit_test_module.c
src/main/unlang_interpret.c
src/main/xlat_eval.c
src/main/xlat_func.c
src/modules/proto_detail/proto_detail.c
src/modules/proto_dhcp/dhcp.c
src/modules/proto_dhcp/dhcpclient.c
src/modules/proto_dhcp/proto_dhcp.c
src/modules/proto_radius/proto_radius_acct.c
src/modules/proto_radius/proto_radius_auth.c
src/modules/proto_radius/proto_radius_coa.c
src/modules/proto_tacacs/proto_tacacs.c
src/modules/proto_tacacs/tacacs.c
src/modules/proto_vmps/proto_vmps.c
src/modules/proto_vmps/vqp.c
src/modules/rlm_attr_filter/rlm_attr_filter.c
src/modules/rlm_cache/rlm_cache.c
src/modules/rlm_couchbase/mod.c
src/modules/rlm_couchbase/rlm_couchbase.c
src/modules/rlm_cram/rlm_cram.c
src/modules/rlm_date/rlm_date.c
src/modules/rlm_detail/rlm_detail.c
src/modules/rlm_eap/eap.c
src/modules/rlm_eap/lib/base/eap_chbind.c
src/modules/rlm_eap/lib/sim/sim_proto.c
src/modules/rlm_eap/lib/sim/vector.c
src/modules/rlm_eap/rlm_eap.c
src/modules/rlm_eap/types/rlm_eap_aka/rlm_eap_aka.c
src/modules/rlm_eap/types/rlm_eap_fast/eap_fast.c
src/modules/rlm_eap/types/rlm_eap_fast/rlm_eap_fast.c
src/modules/rlm_eap/types/rlm_eap_peap/peap.c
src/modules/rlm_eap/types/rlm_eap_peap/rlm_eap_peap.c
src/modules/rlm_eap/types/rlm_eap_pwd/rlm_eap_pwd.c
src/modules/rlm_eap/types/rlm_eap_sim/rlm_eap_sim.c
src/modules/rlm_eap/types/rlm_eap_tls/rlm_eap_tls.c
src/modules/rlm_eap/types/rlm_eap_ttls/rlm_eap_ttls.c
src/modules/rlm_eap/types/rlm_eap_ttls/ttls.c
src/modules/rlm_expr/paircmp.c
src/modules/rlm_files/rlm_files.c
src/modules/rlm_json/json.c
src/modules/rlm_logintime/rlm_logintime.c
src/modules/rlm_lua/lua.c
src/modules/rlm_mschap/mschap.c
src/modules/rlm_mschap/rlm_mschap.c
src/modules/rlm_pap/rlm_pap.c
src/modules/rlm_perl/rlm_perl.c
src/modules/rlm_preprocess/rlm_preprocess.c
src/modules/rlm_python/rlm_python.c
src/modules/rlm_radutmp/rlm_radutmp.c
src/modules/rlm_redis/redis.c
src/modules/rlm_redis_ippool/rlm_redis_ippool.c
src/modules/rlm_rediswho/rlm_rediswho.c
src/modules/rlm_rest/rest.c
src/modules/rlm_rest/rlm_rest.c
src/modules/rlm_securid/rlm_securid.c
src/modules/rlm_soh/rlm_soh.c
src/modules/rlm_sql/rlm_sql.c
src/modules/rlm_sqlcounter/rlm_sqlcounter.c
src/modules/rlm_sqlhpwippool/rlm_sqlhpwippool.c
src/modules/rlm_sqlippool/rlm_sqlippool.c
src/modules/rlm_unix/rlm_unix.c
src/modules/rlm_unpack/rlm_unpack.c
src/modules/rlm_wimax/rlm_wimax.c
src/modules/rlm_yubikey/decrypt.c
src/modules/rlm_yubikey/rlm_yubikey.c
src/protocols/radius/decode.c
src/protocols/radius/encode.c

index ee3ab9bb238b3d95fcd4b627a982b043f6c76b3b..7b7cc20d89badbd93847d7c9fb7e60a0bf375aff 100644 (file)
@@ -136,14 +136,14 @@ typedef struct value_pair_raw {
 #define vp_ether       data.datum.ether
 
 #define vp_bool                data.datum.boolean
-#define vp_byte                data.datum.byte
+#define vp_uint8       data.datum.uint8
 #define vp_short       data.datum.uint16
-#define vp_integer     data.datum.integer
+#define vp_uint32      data.datum.uint32
 #define vp_uint64      data.datum.uint64
 #define vp_size                data.datum.size
 
 #define vp_signed      data.datum.int32
-#define vp_decimal     data.datum.decimal
+#define vp_float64     data.datum.float64
 
 #define vp_date                data.datum.date
 #define vp_filter      data.datum.filter
index cff1ae5b69052f883ac80c9693fc64d19328c949..03a8f06cdad462c819b73709c6eaaa5ac3899bef 100644 (file)
@@ -57,19 +57,22 @@ struct value_box {
 
                struct {
                        union {
-                               uint8_t         byte;           //!< 8bit unsigned integer.
+                               uint8_t         uint8;          //!< 8bit unsigned integer.
                                uint16_t        uint16;         //!< 16bit unsigned integer.
-                               uint32_t        integer;        //!< 32bit unsigned integer.
-                               uint64_t        uint64; //!< 64bit unsigned integer.
-                               size_t          size;           //!< System specific file/memory size.
+                               uint32_t        uint32;         //!< 32bit unsigned integer.
+                               uint64_t        uint64;         //!< 64bit unsigned integer.
 
-                               int32_t         int32;  //!< 32bit signed integer.
+                               int32_t         int32;          //!< 32bit signed integer.
                        };
                        fr_dict_attr_t const    *enumv;         //!< Enumeration values for integer type.
                };
 
+               double                  float64;                //!< Double precision float.
+
+               size_t                  size;                   //!< System specific file/memory size.
                struct timeval          timeval;                //!< A time value with usec precision.
-               double                  decimal;                //!< Double precision float.
+
+
                uint32_t                date;                   //!< Date (32bit Unix timestamp).
 
 
index d3aa517adb70dfee52e7469b72344ebcdb19e923..4721f514bdfc936e0c76daebb3e0e572e00864e2 100644 (file)
@@ -112,7 +112,7 @@ FR_NAME_NUMBER const dict_attr_types[] = {
        { "size",               FR_TYPE_SIZE },
        { "signed",             FR_TYPE_INT32 },
 
-       { "decimal",            FR_TYPE_FLOAT64 },
+       { "float64",            FR_TYPE_FLOAT64 },
        { "timeval",            FR_TYPE_TIMEVAL },
        { "date",               FR_TYPE_DATE },
 
index 7c8cdc7c597d846298b4aedbb8c0e4fdc9dcfbf8..574f2ad5f17aa3df3d04f8190c39b99613af30da 100644 (file)
@@ -845,7 +845,7 @@ static int ascend_parse_ip(int argc, char **argv, ascend_ip_filter_t *filter)
  *     offset:         A Number. Specifies an offset into a frame
  *                     to start comparing.
  *
- *     mask:           A hexadecimal mask of bits to compare.
+ *     mask:           A hexafloat64 mask of bits to compare.
  *
  *     value:          A value to compare with the masked data.
  *
index e85ffa9035f8f244b16cdc29399ff7d99dcc0078..a73a334c7ec4ac09418aa2809a4b59816c771601 100644 (file)
@@ -748,7 +748,7 @@ size_t fr_snprint_uint128(char *out, size_t outlen, uint128_t const num)
                n[h] = ((n[h] << 1) & 0xffffffffffffffff) + (n[l] >= 0x8000000000000000);
                n[l] = ((n[l] << 1) & 0xffffffffffffffff);
 
-               // Add s[] to itself in decimal, doubling it
+               // Add s[] to itself in float64, doubling it
                for (j = sizeof(buff) - 2; j >= 0; j--) {
                        buff[j] += buff[j] - '0' + carry;
                        carry = (buff[j] > '9');
@@ -1055,7 +1055,7 @@ int fr_timeval_from_str(struct timeval *out, char const *in)
 
        sec = strtoul(in, &end, 10);
        if (in == end) {
-               fr_strerror_printf("Failed parsing \"%s\" as decimal", in);
+               fr_strerror_printf("Failed parsing \"%s\" as float64", in);
                return -1;
        }
        tv.tv_sec = sec;
@@ -1076,7 +1076,7 @@ int fr_timeval_from_str(struct timeval *out, char const *in)
                 */
                sec = strtoul(end + 1, &end, 10);
                if (in == end) {
-                       fr_strerror_printf("Failed parsing fractional component \"%s\" of decimal ", in);
+                       fr_strerror_printf("Failed parsing fractional component \"%s\" of float64 ", in);
                        return -1;
                }
                while (len < 6) {
index 7d9be7dd26187749fe80e1df4f804cd2e79d7543..0bcc54560abed8f1efce851eab253f0048a4e3a1 100644 (file)
@@ -37,7 +37,7 @@ RCSID("$Id$")
 static int _fr_pair_free(NDEBUG_UNUSED VALUE_PAIR *vp)
 {
 #ifndef NDEBUG
-       vp->vp_integer = FREE_MAGIC;
+       vp->vp_uint32 = FREE_MAGIC;
 #endif
 
 #ifdef TALLOC_DEBUG
@@ -2267,7 +2267,7 @@ char const *fr_pair_value_enum(VALUE_PAIR const *vp, char buff[20])
                return vp->vp_bool ? "yes" : "no";
 
        case FR_TYPE_UINT8:
-               enumv = fr_dict_enum_by_da(NULL, vp->da, vp->vp_byte);
+               enumv = fr_dict_enum_by_da(NULL, vp->da, vp->vp_uint8);
                break;
 
        case FR_TYPE_UINT16:
@@ -2275,7 +2275,7 @@ char const *fr_pair_value_enum(VALUE_PAIR const *vp, char buff[20])
                break;
 
        case FR_TYPE_UINT32:
-               enumv = fr_dict_enum_by_da(NULL, vp->da, vp->vp_integer);
+               enumv = fr_dict_enum_by_da(NULL, vp->da, vp->vp_uint32);
                break;
 
        case FR_TYPE_UINT64:
index 4f79a32d64a0ac1388012f7f060347b6d79acddf..4a24629023b753a8fae5f4d512f48e760bad2c7e 100644 (file)
@@ -249,9 +249,9 @@ char ** fract;
  */
 PRIVATE void
 #ifdef __STDC__
-decimal(struct DATA *p, double d)
+float64(struct DATA *p, double d)
 #else
-decimal(p, d)
+float64(p, d)
 struct DATA *p;
 double d;
 #endif
@@ -294,7 +294,7 @@ double d;
        PAD_LEFT(p);
 }
 
-/* for %x %X hexadecimal representation */
+/* for %x %X hexafloat64 representation */
 PRIVATE void
 #ifdef __STDC__
 hexa(struct DATA *p, double d)
@@ -572,7 +572,7 @@ va_list args;
                        exponent(&data, d);
                        state = 0;
                        break;
-               case 'u':       /* unsigned decimal */
+               case 'u':       /* unsigned float64 */
                        STAR_ARGS(&data);
                        if (data.a_longlong == FOUND)
                                d = va_arg(args, unsigned LONG_LONG);
@@ -580,10 +580,10 @@ va_list args;
                                d = va_arg(args, unsigned long);
                        else
                                d = va_arg(args, unsigned int);
-                       decimal(&data, d);
+                       float64(&data, d);
                        state = 0;
                        break;
-               case 'd':       /* decimal */
+               case 'd':       /* float64 */
                        STAR_ARGS(&data);
                        if (data.a_longlong == FOUND)
                                d = va_arg(args, LONG_LONG);
@@ -591,7 +591,7 @@ va_list args;
                                d = va_arg(args, long);
                        else
                                d = va_arg(args, int);
-                       decimal(&data, d);
+                       float64(&data, d);
                        state = 0;
                        break;
                case 'o':       /* octal */
@@ -606,7 +606,7 @@ va_list args;
                        state = 0;
                        break;
                case 'x':
-               case 'X':       /* hexadecimal */
+               case 'X':       /* hexafloat64 */
                        STAR_ARGS(&data);
                        if (data.a_longlong == FOUND)
                                d = va_arg(args, LONG_LONG);
index c80de2d0244c6a0351468fd60ba4cbd199db5bcb..c3f616dea58cdd136d0582a6ebf67bb0fdbcdd3c 100644 (file)
@@ -135,7 +135,7 @@ struct DATA {
   PRIVATE void conv_flag(char *, struct DATA *);
   PRIVATE void floating(struct DATA *, double);
   PRIVATE void exponent(struct DATA *, double);
-  PRIVATE void decimal(struct DATA *, double);
+  PRIVATE void float64(struct DATA *, double);
   PRIVATE void octal(struct DATA *, double);
   PRIVATE void hexa(struct DATA *, double);
   PRIVATE void strings(struct DATA *, char *);
@@ -151,7 +151,7 @@ struct DATA {
   PRIVATE void conv_flag();
   PRIVATE void floating();
   PRIVATE void exponent();
-  PRIVATE void decimal();
+  PRIVATE void float64();
   PRIVATE void octal();
   PRIVATE void hexa();
   PRIVATE void strings();
index ace1bc2e1af60cf76f743377e638c67d58867461..04d201a1ac69f733b413e7e8bda4ba2efb5088ab 100644 (file)
@@ -22,8 +22,8 @@
  * There are three notional data formats used in the server:
  *
  * - #fr_value_box_t are the INTERNAL format.  This is usually close to the in-memory representation
- *   of the data, though integers and IPs are always converted to/from octets with BIG ENDIAN
- *   byte ordering for consistency.
+ *   of the data, though uint32s and IPs are always converted to/from octets with BIG ENDIAN
+ *   uint8 ordering for consistency.
  *   - #fr_value_box_cast is used to convert (cast) #fr_value_box_t between INTERNAL formats.
  *   - #fr_value_box_strdup* is used to ingest nul terminated strings into the INTERNAL format.
  *   - #fr_value_box_memdup* is used to ingest binary data into the INTERNAL format.
@@ -31,7 +31,7 @@
  * - NETWORK format is the format we send/receive on the wire.  It is not a perfect representation
  *   of data packing for all protocols, so you will likely need to overload conversion for some types.
  *   - fr_value_box_to_network is used to covert INTERNAL format data to generic NETWORK format data.
- *     For integers, IP addresses etc... This means BIG ENDIAN byte ordering.
+ *     For uint32s, IP addresses etc... This means BIG ENDIAN uint8 ordering.
  *   - fr_value_box_from_network is used to convert packet buffer fragments in NETWORK format to
  *     INTERNAL format.
  *
@@ -49,7 +49,7 @@ RCSID("$Id$")
 #include <freeradius-devel/rad_assert.h>
 #include <ctype.h>
 
-/** How many bytes on-the-wire would a #fr_value_box_t value consume
+/** How many uint8s on-the-wire would a #fr_value_box_t value consume
  *
  * This is for the generic NETWORK format.  For field sizes in the in-memory
  * structure use #fr_value_box_field_sizes.
@@ -96,19 +96,19 @@ static_assert(SIZEOF_MEMBER(fr_value_box_t, datum.ether) == 6,
              "datum.ether has unexpected length");
 static_assert(SIZEOF_MEMBER(fr_value_box_t, datum.boolean) == 1,
              "datum.boolean has unexpected length");
-static_assert(SIZEOF_MEMBER(fr_value_box_t, datum.byte) == 1,
-             "datum.byte has unexpected length");
+static_assert(SIZEOF_MEMBER(fr_value_box_t, datum.uint8) == 1,
+             "datum.uint8 has unexpected length");
 static_assert(SIZEOF_MEMBER(fr_value_box_t, datum.uint16) == 2,
              "datum.uint16 has unexpected length");
-static_assert(SIZEOF_MEMBER(fr_value_box_t, datum.integer) == 4,
-             "datum.integer has unexpected length");
+static_assert(SIZEOF_MEMBER(fr_value_box_t, datum.uint32) == 4,
+             "datum.uint32 has unexpected length");
 static_assert(SIZEOF_MEMBER(fr_value_box_t, datum.uint64) == 8,
              "datum.uint64 has unexpected length");
 static_assert(SIZEOF_MEMBER(fr_value_box_t, datum.int32) == 4,
              "datum.int32 has unexpected length");
 
 
-/** How many bytes wide each of the value data fields are
+/** How many uint8s wide each of the value data fields are
  *
  * This is useful when copying a value from a fr_value_box_t to a memory
  * location passed as a void *.
@@ -125,16 +125,16 @@ size_t const fr_value_box_field_sizes[] = {
        [FR_TYPE_ETHERNET]                      = SIZEOF_MEMBER(fr_value_box_t, datum.ether),
 
        [FR_TYPE_BOOL]                          = SIZEOF_MEMBER(fr_value_box_t, datum.boolean),
-       [FR_TYPE_UINT8]                         = SIZEOF_MEMBER(fr_value_box_t, datum.byte),
+       [FR_TYPE_UINT8]                         = SIZEOF_MEMBER(fr_value_box_t, datum.uint8),
        [FR_TYPE_UINT16]                        = SIZEOF_MEMBER(fr_value_box_t, datum.uint16),
-       [FR_TYPE_UINT32]                        = SIZEOF_MEMBER(fr_value_box_t, datum.integer),
+       [FR_TYPE_UINT32]                        = SIZEOF_MEMBER(fr_value_box_t, datum.uint32),
        [FR_TYPE_UINT64]                        = SIZEOF_MEMBER(fr_value_box_t, datum.uint64),
        [FR_TYPE_SIZE]                          = SIZEOF_MEMBER(fr_value_box_t, datum.size),
 
        [FR_TYPE_INT32]                         = SIZEOF_MEMBER(fr_value_box_t, datum.int32),
 
        [FR_TYPE_TIMEVAL]                       = SIZEOF_MEMBER(fr_value_box_t, datum.timeval),
-       [FR_TYPE_FLOAT64]                       = SIZEOF_MEMBER(fr_value_box_t, datum.decimal),
+       [FR_TYPE_FLOAT64]                       = SIZEOF_MEMBER(fr_value_box_t, datum.float64),
        [FR_TYPE_DATE]                          = SIZEOF_MEMBER(fr_value_box_t, datum.date),
 
        [FR_TYPE_ABINARY]                       = SIZEOF_MEMBER(fr_value_box_t, datum.filter),
@@ -156,16 +156,16 @@ size_t const fr_value_box_offsets[] = {
        [FR_TYPE_ETHERNET]                      = offsetof(fr_value_box_t, datum.ether),
 
        [FR_TYPE_BOOL]                          = offsetof(fr_value_box_t, datum.boolean),
-       [FR_TYPE_UINT8]                         = offsetof(fr_value_box_t, datum.byte),
+       [FR_TYPE_UINT8]                         = offsetof(fr_value_box_t, datum.uint8),
        [FR_TYPE_UINT16]                        = offsetof(fr_value_box_t, datum.uint16),
-       [FR_TYPE_UINT32]                        = offsetof(fr_value_box_t, datum.integer),
+       [FR_TYPE_UINT32]                        = offsetof(fr_value_box_t, datum.uint32),
        [FR_TYPE_UINT64]                        = offsetof(fr_value_box_t, datum.uint64),
        [FR_TYPE_SIZE]                          = offsetof(fr_value_box_t, datum.size),
 
        [FR_TYPE_INT32]                         = offsetof(fr_value_box_t, datum.int32),
 
        [FR_TYPE_TIMEVAL]                       = offsetof(fr_value_box_t, datum.timeval),
-       [FR_TYPE_FLOAT64]                       = offsetof(fr_value_box_t, datum.decimal),
+       [FR_TYPE_FLOAT64]                       = offsetof(fr_value_box_t, datum.float64),
 
        [FR_TYPE_DATE]                          = offsetof(fr_value_box_t, datum.date),
 
@@ -306,7 +306,7 @@ int fr_value_box_cmp(fr_value_box_t const *a, fr_value_box_t const *b)
 
        case FR_TYPE_BOOL:      /* this isn't a RADIUS type, and shouldn't really ever be used */
        case FR_TYPE_UINT8:
-               CHECK(byte);
+               CHECK(uint8);
                break;
 
        case FR_TYPE_UINT16:
@@ -318,7 +318,7 @@ int fr_value_box_cmp(fr_value_box_t const *a, fr_value_box_t const *b)
                break;
 
        case FR_TYPE_UINT32:
-               CHECK(integer);
+               CHECK(int32);
                break;
 
        case FR_TYPE_INT32:
@@ -338,7 +338,7 @@ int fr_value_box_cmp(fr_value_box_t const *a, fr_value_box_t const *b)
                break;
 
        case FR_TYPE_FLOAT64:
-               CHECK(decimal);
+               CHECK(float64);
                break;
 
        case FR_TYPE_ETHERNET:
@@ -383,7 +383,7 @@ int fr_value_box_cmp(fr_value_box_t const *a, fr_value_box_t const *b)
  *
  *     reserved, prefix-len, data...
  */
-static int fr_value_box_cidr_cmp_op(FR_TOKEN op, int bytes,
+static int fr_value_box_cidr_cmp_op(FR_TOKEN op, int uint8s,
                                 uint8_t a_net, uint8_t const *a,
                                 uint8_t b_net, uint8_t const *b)
 {
@@ -396,7 +396,7 @@ static int fr_value_box_cidr_cmp_op(FR_TOKEN op, int bytes,
        if (a_net == b_net) {
                int compare;
 
-               compare = memcmp(a, b, bytes);
+               compare = memcmp(a, b, uint8s);
 
                /*
                 *      If they're identical return true for
@@ -455,14 +455,14 @@ static int fr_value_box_cidr_cmp_op(FR_TOKEN op, int bytes,
        }
 
        /*
-        *      Do the check byte by byte.  If the bytes are
+        *      Do the check uint8 by uint8.  If the uint8s are
         *      identical, it MAY be a match.  If they're different,
         *      it is NOT a match.
         */
        i = 0;
-       while (i < bytes) {
+       while (i < uint8s) {
                /*
-                *      All leading bytes are identical.
+                *      All leading uint8s are identical.
                 */
                if (common == 0) return true;
 
@@ -640,7 +640,7 @@ static char const hextab[] = "0123456789abcdef";
  * @param[in] inlen    Length of input string.
  * @param[in] quote    Character around the string, determines unescaping mode.
  *
- * @return >= 0 the number of bytes written to out.
+ * @return >= 0 the number of uint8s written to out.
  */
 size_t value_str_unescape(uint8_t *out, char const *in, size_t inlen, char quote)
 {
@@ -788,10 +788,10 @@ size_t value_str_unescape(uint8_t *out, char const *in, size_t inlen, char quote
        return out_p - out;
 }
 
-/** Performs byte order reversal for types that need it
+/** Performs uint8 order reversal for types that need it
  *
  * @param[in] dst      Where to write the result.  May be the same as src.
- * @param[in] src      #fr_value_box_t containing an integer value.
+ * @param[in] src      #fr_value_box_t containing an uint32 value.
  * @return
  *     - 0 on success.
  *     - -1 on failure.
@@ -800,22 +800,22 @@ int fr_value_box_hton(fr_value_box_t *dst, fr_value_box_t const *src)
 {
        if (!fr_cond_assert(src->type != FR_TYPE_INVALID)) return -1;
 
-       /* 8 byte integers */
+       /* 8 uint8 uint32s */
        switch (src->type) {
        case FR_TYPE_UINT64:
                dst->datum.uint64 = htonll(src->datum.uint64);
                fr_value_box_copy_meta(dst, src);
                break;
 
-       /* 4 byte integers */
+       /* 4 uint8 uint32s */
        case FR_TYPE_UINT32:
        case FR_TYPE_DATE:
        case FR_TYPE_INT32:
-               dst->datum.integer = htonl(src->datum.integer);
+               dst->datum.uint32 = htonl(src->datum.uint32);
                fr_value_box_copy_meta(dst, src);
                break;
 
-       /* 2 byte integers */
+       /* 2 uint8 uint32s */
        case FR_TYPE_UINT16:
                dst->datum.uint16 = htons(src->datum.uint16);
                fr_value_box_copy_meta(dst, src);
@@ -908,7 +908,7 @@ static inline int fr_value_box_cast_to_octets(TALLOC_CTX *ctx, fr_value_box_t *d
                break;
 
        /*
-        *      <4 bytes address>
+        *      <4 uint8s address>
         */
        case FR_TYPE_IPV4_ADDR:
        {
@@ -918,7 +918,7 @@ static inline int fr_value_box_cast_to_octets(TALLOC_CTX *ctx, fr_value_box_t *d
                break;
 
        /*
-        *      <1 byte prefix> + <4 bytes address>
+        *      <1 uint8 prefix> + <4 uint8s address>
         */
        case FR_TYPE_IPV4_PREFIX:
                bin = talloc_array(ctx, uint8_t, sizeof(src->datum.ip.addr.v4.s_addr) + 1);
@@ -927,7 +927,7 @@ static inline int fr_value_box_cast_to_octets(TALLOC_CTX *ctx, fr_value_box_t *d
                break;
 
        /*
-        *      <16 bytes address>
+        *      <16 uint8s address>
         */
        case FR_TYPE_IPV6_ADDR:
                bin = talloc_memdup(ctx, (uint8_t const *)src->datum.ip.addr.v6.s6_addr,
@@ -935,7 +935,7 @@ static inline int fr_value_box_cast_to_octets(TALLOC_CTX *ctx, fr_value_box_t *d
                break;
 
        /*
-        *      <1 byte prefix> + <1 byte scope> + <16 bytes address>
+        *      <1 uint8 prefix> + <1 uint8 scope> + <16 uint8s address>
         */
        case FR_TYPE_IPV6_PREFIX:
                bin = talloc_array(ctx, uint8_t, sizeof(src->datum.ip.addr.v6.s6_addr) + 2);
@@ -947,7 +947,7 @@ static inline int fr_value_box_cast_to_octets(TALLOC_CTX *ctx, fr_value_box_t *d
         *      Get the raw binary in memory representation
         */
        default:
-               fr_value_box_hton(dst, src);    /* Flip any integer representations */
+               fr_value_box_hton(dst, src);    /* Flip any uint32 representations */
                bin = talloc_memdup(ctx, ((uint8_t *)&dst->datum) + fr_value_box_offsets[src->type],
                                    fr_value_box_field_sizes[src->type]);
                break;
@@ -1031,7 +1031,7 @@ static inline int fr_value_box_cast_to_ipv4addr(TALLOC_CTX *ctx, fr_value_box_t
 
        case FR_TYPE_OCTETS:
                if (src->datum.length != sizeof(dst->datum.ip.addr.v4.s_addr)) {
-                       fr_strerror_printf("Invalid cast from %s to %s.  Only %zu byte octet strings "
+                       fr_strerror_printf("Invalid cast from %s to %s.  Only %zu uint8 octet strings "
                                           "may be cast to IP address types",
                                           fr_int2str(dict_attr_types, src->type, "<INVALID>"),
                                           fr_int2str(dict_attr_types, dst_type, "<INVALID>"),
@@ -1045,7 +1045,7 @@ static inline int fr_value_box_cast_to_ipv4addr(TALLOC_CTX *ctx, fr_value_box_t
        {
                uint32_t net;
 
-               net = ntohl(src->datum.integer);
+               net = ntohl(src->datum.uint32);
                memcpy(&dst->datum.ip.addr.v4, (uint8_t *)&net, sizeof(dst->datum.ip.addr.v4.s_addr));
        }
                break;
@@ -1091,7 +1091,7 @@ static inline int fr_value_box_cast_to_ipv4prefix(TALLOC_CTX *ctx, fr_value_box_
                break;
 
        /*
-        *      Copy the last four bytes, to make an IPv4prefix
+        *      Copy the last four uint8s, to make an IPv4prefix
         */
        case FR_TYPE_IPV6_ADDR:
                if (memcmp(src->datum.ip.addr.v6.s6_addr, v4_v6_map, sizeof(v4_v6_map)) != 0) {
@@ -1133,7 +1133,7 @@ static inline int fr_value_box_cast_to_ipv4prefix(TALLOC_CTX *ctx, fr_value_box_
 
        case FR_TYPE_OCTETS:
                if (src->datum.length != sizeof(dst->datum.ip.addr.v4.s_addr) + 1) {
-                       fr_strerror_printf("Invalid cast from %s to %s.  Only %zu byte octet strings "
+                       fr_strerror_printf("Invalid cast from %s to %s.  Only %zu uint8 octet strings "
                                           "may be cast to IP address types",
                                           fr_int2str(dict_attr_types, src->type, "<INVALID>"),
                                           fr_int2str(dict_attr_types, dst_type, "<INVALID>"),
@@ -1148,7 +1148,7 @@ static inline int fr_value_box_cast_to_ipv4prefix(TALLOC_CTX *ctx, fr_value_box_
        {
                uint32_t net;
 
-               net = ntohl(src->datum.integer);
+               net = ntohl(src->datum.uint32);
                memcpy(&dst->datum.ip.addr.v4, (uint8_t *)&net, sizeof(dst->datum.ip.addr.v4.s_addr));
                dst->datum.ip.prefix = 32;
        }
@@ -1242,7 +1242,7 @@ static inline int fr_value_box_cast_to_ipv6addr(TALLOC_CTX *ctx, fr_value_box_t
 
        case FR_TYPE_OCTETS:
                if (src->datum.length != sizeof(dst->datum.ip.addr.v6.s6_addr)) {
-                       fr_strerror_printf("Invalid cast from %s to %s.  Only %zu byte octet strings "
+                       fr_strerror_printf("Invalid cast from %s to %s.  Only %zu uint8 octet strings "
                                           "may be cast to IP address types",
                                           fr_int2str(dict_attr_types, src->type, "<INVALID>"),
                                           fr_int2str(dict_attr_types, dst_type, "<INVALID>"),
@@ -1325,7 +1325,7 @@ static inline int fr_value_box_cast_to_ipv6prefix(TALLOC_CTX *ctx, fr_value_box_
 
        case FR_TYPE_OCTETS:
                if (src->datum.length != (sizeof(dst->datum.ip.addr.v6.s6_addr) + 2)) {
-                       fr_strerror_printf("Invalid cast from %s to %s.  Only %zu byte octet strings "
+                       fr_strerror_printf("Invalid cast from %s to %s.  Only %zu uint8 octet strings "
                                           "may be cast to IP address types",
                                           fr_int2str(dict_attr_types, src->type, "<INVALID>"),
                                           fr_int2str(dict_attr_types, dst_type, "<INVALID>"),
@@ -1357,7 +1357,7 @@ static inline int fr_value_box_cast_to_ipv6prefix(TALLOC_CTX *ctx, fr_value_box_
  * @param ctx          to allocate buffers in (usually the same as dst)
  * @param dst          Where to write result of casting.
  * @param dst_type     to cast to.
- * @param dst_enumv    Enumerated values used to converts strings to integers.
+ * @param dst_enumv    Enumerated values used to converts strings to uint32s.
  * @param src          Input data.
  * @return
  *     - 0 on success.
@@ -1476,7 +1476,7 @@ int fr_value_box_cast(TALLOC_CTX *ctx, fr_value_box_t *dst,
        if (dst_type == FR_TYPE_UINT16) {
                switch (src->type) {
                case FR_TYPE_UINT8:
-                       dst->datum.uint16 = src->datum.byte;
+                       dst->datum.uint16 = src->datum.uint8;
                        break;
 
                case FR_TYPE_OCTETS:
@@ -1489,26 +1489,26 @@ int fr_value_box_cast(TALLOC_CTX *ctx, fr_value_box_t *dst,
        }
 
        /*
-        *      We can cast LONG integers to SHORTER ones, so long
+        *      We can cast LONG uint32s to SHORTER ones, so long
         *      as the long one is on the LHS.
         */
        if (dst_type == FR_TYPE_UINT32) {
                switch (src->type) {
                case FR_TYPE_UINT8:
-                       dst->datum.integer = src->datum.byte;
+                       dst->datum.uint32 = src->datum.uint8;
                        break;
 
                case FR_TYPE_UINT16:
-                       dst->datum.integer = src->datum.uint16;
+                       dst->datum.uint32 = src->datum.uint16;
                        break;
 
                case FR_TYPE_INT32:
                        if (src->datum.int32 < 0 ) {
-                               fr_strerror_printf("Invalid cast: From signed to integer.  "
+                               fr_strerror_printf("Invalid cast: From signed to uint32.  "
                                                   "signed value %d is negative ", src->datum.int32);
                                return -1;
                        }
-                       dst->datum.integer = (uint32_t)src->datum.int32;
+                       dst->datum.uint32 = (uint32_t)src->datum.int32;
                        break;
 
                case FR_TYPE_OCTETS:
@@ -1521,13 +1521,13 @@ int fr_value_box_cast(TALLOC_CTX *ctx, fr_value_box_t *dst,
        }
 
        /*
-        *      For integers, we allow the casting of a SMALL type to
+        *      For uint32s, we allow the casting of a SMALL type to
         *      a larger type, but not vice-versa.
         */
        if (dst_type == FR_TYPE_UINT64) {
                switch (src->type) {
                case FR_TYPE_UINT8:
-                       dst->datum.uint64 = src->datum.byte;
+                       dst->datum.uint64 = src->datum.uint8;
                        break;
 
                case FR_TYPE_UINT16:
@@ -1535,7 +1535,7 @@ int fr_value_box_cast(TALLOC_CTX *ctx, fr_value_box_t *dst,
                        break;
 
                case FR_TYPE_UINT32:
-                       dst->datum.uint64 = src->datum.integer;
+                       dst->datum.uint64 = src->datum.uint32;
                        break;
 
                case FR_TYPE_DATE:
@@ -1557,12 +1557,12 @@ int fr_value_box_cast(TALLOC_CTX *ctx, fr_value_box_t *dst,
        }
 
        /*
-        *      We can cast integers less that < INT_MAX to signed
+        *      We can cast uint32s less that < INT_MAX to signed
         */
        if (dst_type == FR_TYPE_INT32) {
                switch (src->type) {
                case FR_TYPE_UINT8:
-                       dst->datum.int32 = src->datum.byte;
+                       dst->datum.int32 = src->datum.uint8;
                        break;
 
                case FR_TYPE_UINT16:
@@ -1570,16 +1570,16 @@ int fr_value_box_cast(TALLOC_CTX *ctx, fr_value_box_t *dst,
                        break;
 
                case FR_TYPE_UINT32:
-                       if (src->datum.integer > INT_MAX) {
-                               fr_strerror_printf("Invalid cast: From integer to signed.  integer value %u is larger "
-                                                  "than max signed int and would overflow", src->datum.integer);
+                       if (src->datum.uint32 > INT_MAX) {
+                               fr_strerror_printf("Invalid cast: From uint32 to signed.  uint32 value %u is larger "
+                                                  "than max signed int and would overflow", src->datum.uint32);
                                return -1;
                        }
-                       dst->datum.int32 = (int)src->datum.integer;
+                       dst->datum.int32 = (int)src->datum.uint32;
                        break;
 
                case FR_TYPE_UINT64:
-                       if (src->datum.integer > INT_MAX) {
+                       if (src->datum.uint32 > INT_MAX) {
                                fr_strerror_printf("Invalid cast: From uint64 to signed.  uint64 value %" PRIu64
                                                   " is larger than max signed int and would overflow", src->datum.uint64);
                                return -1;
@@ -1599,7 +1599,7 @@ int fr_value_box_cast(TALLOC_CTX *ctx, fr_value_box_t *dst,
        if (dst_type == FR_TYPE_TIMEVAL) {
                switch (src->type) {
                case FR_TYPE_UINT8:
-                       dst->datum.timeval.tv_sec = src->datum.byte;
+                       dst->datum.timeval.tv_sec = src->datum.uint8;
                        dst->datum.timeval.tv_usec = 0;
                        break;
 
@@ -1609,7 +1609,7 @@ int fr_value_box_cast(TALLOC_CTX *ctx, fr_value_box_t *dst,
                        break;
 
                case FR_TYPE_UINT32:
-                       dst->datum.timeval.tv_sec = src->datum.integer;
+                       dst->datum.timeval.tv_sec = src->datum.uint32;
                        dst->datum.timeval.tv_usec = 0;
                        break;
 
@@ -1657,7 +1657,7 @@ int fr_value_box_cast(TALLOC_CTX *ctx, fr_value_box_t *dst,
 
                /*
                 *      Copy the raw octets into the datum of a value_box
-                *      inverting bytesex for integers (if LE).
+                *      inverting uint8sex for uint32s (if LE).
                 */
                memcpy(&tmp.datum, src->datum.octets, fr_value_box_field_sizes[dst_type]);
                tmp.type = dst_type;
@@ -1689,7 +1689,7 @@ int fr_value_box_cast(TALLOC_CTX *ctx, fr_value_box_t *dst,
        }
 
        /*
-        *      Convert host order to network byte order.
+        *      Convert host order to network uint8 order.
         */
        if ((dst_type == FR_TYPE_IPV4_ADDR) &&
            ((src->type == FR_TYPE_UINT32) ||
@@ -1698,15 +1698,15 @@ int fr_value_box_cast(TALLOC_CTX *ctx, fr_value_box_t *dst,
                dst->datum.ip.af = AF_INET;
                dst->datum.ip.prefix = 32;
                dst->datum.ip.scope_id = 0;
-               dst->datum.ip.addr.v4.s_addr = htonl(src->datum.integer);
+               dst->datum.ip.addr.v4.s_addr = htonl(src->datum.uint32);
 
        } else if ((src->type == FR_TYPE_IPV4_ADDR) &&
                   ((dst_type == FR_TYPE_UINT32) ||
                    (dst_type == FR_TYPE_DATE) ||
                    (dst_type == FR_TYPE_INT32))) {
-               dst->datum.integer = htonl(src->datum.ip.addr.v4.s_addr);
+               dst->datum.uint32 = htonl(src->datum.ip.addr.v4.s_addr);
 
-       } else {                /* they're of the same byte order */
+       } else {                /* they're of the same uint8 order */
                memcpy(&dst->datum, &src->datum, fr_value_box_field_sizes[src->type]);
        }
 
@@ -1743,7 +1743,7 @@ int fr_value_box_copy(TALLOC_CTX *ctx, fr_value_box_t *dst, const fr_value_box_t
                char *str = NULL;
 
                /*
-                *      Zero length strings still have a one byte buffer
+                *      Zero length strings still have a one uint8 buffer
                 */
                str = talloc_bstrndup(ctx, src->datum.strvalue, src->datum.length);
                if (!str) {
@@ -2204,7 +2204,7 @@ int fr_value_box_from_ipaddr(fr_value_box_t *dst, fr_ipaddr_t const *ipaddr)
  * @param[in] ctx              to alloc strings in.
  * @param[out] dst             where to write parsed value.
  * @param[in,out] dst_type     of value data to create/dst_type of value created.
- * @param[in] dst_enumv                fr_dict_attr_t with string aliases for integer values.
+ * @param[in] dst_enumv                fr_dict_attr_t with string aliases for uint32 values.
  * @param[in] in               String to convert. Binary safe for variable length values
  *                             if len is provided.
  * @param[in] inlen            may be < 0 in which case strlen(len) is used to determine
@@ -2297,7 +2297,7 @@ int fr_value_box_from_str(TALLOC_CTX *ctx, fr_value_box_t *dst,
                 *      Invalid.
                 */
                if ((len & 0x01) != 0) {
-                       fr_strerror_printf("Length of Hex String is not even, got %zu bytes", len);
+                       fr_strerror_printf("Length of Hex String is not even, got %zu uint8s", len);
                        return -1;
                }
 
@@ -2435,7 +2435,7 @@ int fr_value_box_from_str(TALLOC_CTX *ctx, fr_value_box_t *dst,
                unsigned int i;
 
                /*
-                *      Note that ALL integers are unsigned!
+                *      Note that ALL uint32s are unsigned!
                 */
                i = fr_strtoul(in, &p);
 
@@ -2450,14 +2450,14 @@ int fr_value_box_from_str(TALLOC_CTX *ctx, fr_value_box_t *dst,
                                return -1;
                        }
 
-                       dst->datum.byte = dval->value;
+                       dst->datum.uint8 = dval->value;
                } else {
                        if (i > 255) {
                                fr_strerror_printf("Byte value \"%s\" is larger than 255", in);
                                return -1;
                        }
 
-                       dst->datum.byte = i;
+                       dst->datum.uint8 = i;
                }
                break;
        }
@@ -2468,7 +2468,7 @@ int fr_value_box_from_str(TALLOC_CTX *ctx, fr_value_box_t *dst,
                unsigned int i;
 
                /*
-                *      Note that ALL integers are unsigned!
+                *      Note that ALL uint32s are unsigned!
                 */
                i = fr_strtoul(in, &p);
 
@@ -2501,7 +2501,7 @@ int fr_value_box_from_str(TALLOC_CTX *ctx, fr_value_box_t *dst,
 
                /*
                 *       If we have an enum, and the value isn't an
-                *       integer or hex string, try to parse it as a
+                *       uint32 or hex string, try to parse it as a
                 *       named value.  Some VALUE names begin with
                 *       numbers, so we have to be a bit flexible
                 *       here.
@@ -2514,7 +2514,7 @@ int fr_value_box_from_str(TALLOC_CTX *ctx, fr_value_box_t *dst,
                                return -1;
                        }
 
-                       dst->datum.integer = dval->value;
+                       dst->datum.uint32 = dval->value;
 
                } else {
                        unsigned long i;
@@ -2526,7 +2526,7 @@ int fr_value_box_from_str(TALLOC_CTX *ctx, fr_value_box_t *dst,
                         *      compatability.
                         */
                        if (!*in || !isdigit((int) *in)) {
-                               dst->datum.integer = 0;
+                               dst->datum.uint32 = 0;
                                break;
                        }
 
@@ -2548,7 +2548,7 @@ int fr_value_box_from_str(TALLOC_CTX *ctx, fr_value_box_t *dst,
                        /*
                         *      Value is always within the limits
                         */
-                       dst->datum.integer = (uint32_t) i;
+                       dst->datum.uint32 = (uint32_t) i;
                }
        }
                break;
@@ -2558,10 +2558,10 @@ int fr_value_box_from_str(TALLOC_CTX *ctx, fr_value_box_t *dst,
                uint64_t i;
 
                /*
-                *      Note that ALL integers are unsigned!
+                *      Note that ALL uint32s are unsigned!
                 */
                if (sscanf(in, "%" PRIu64, &i) != 1) {
-                       fr_strerror_printf("Failed parsing \"%s\" as unsigned 64bit integer", in);
+                       fr_strerror_printf("Failed parsing \"%s\" as unsigned 64bit uint32", in);
                        return -1;
                }
                dst->datum.uint64 = i;
@@ -2589,10 +2589,10 @@ int fr_value_box_from_str(TALLOC_CTX *ctx, fr_value_box_t *dst,
                double d;
 
                if (sscanf(in, "%lf", &d) != 1) {
-                       fr_strerror_printf("Failed parsing \"%s\" as a decimal", in);
+                       fr_strerror_printf("Failed parsing \"%s\" as a float64", in);
                        return -1;
                }
-               dst->datum.decimal = d;
+               dst->datum.float64 = d;
        }
                break;
 
@@ -2627,15 +2627,15 @@ int fr_value_box_from_str(TALLOC_CTX *ctx, fr_value_box_t *dst,
                size_t p_len = 0;
 
                /*
-                *      Convert things which are obviously integers to Ethernet addresses
+                *      Convert things which are obviously uint32s to Ethernet addresses
                 *
                 *      We assume the number is the bigendian representation of the
                 *      ethernet address.
                 */
                if (is_integer(in)) {
-                       uint64_t integer = htonll(atoll(in));
+                       uint64_t uint32 = htonll(atoll(in));
 
-                       memcpy(dst->datum.ether, &integer, sizeof(dst->datum.ether));
+                       memcpy(dst->datum.ether, &uint32, sizeof(dst->datum.ether));
                        break;
                }
 
@@ -2761,7 +2761,7 @@ char *fr_value_box_asprint(TALLOC_CTX *ctx, fr_value_box_t const *data, char quo
 
                fr_value_box_cast(ctx, &tmp, FR_TYPE_UINT32, NULL, data);
 
-               dv = fr_dict_enum_by_da(NULL, data->datum.enumv, tmp.datum.integer);
+               dv = fr_dict_enum_by_da(NULL, data->datum.enumv, tmp.datum.uint32);
                if (dv) return talloc_typed_strdup(ctx, dv->name);
        }
 
@@ -2847,11 +2847,11 @@ char *fr_value_box_asprint(TALLOC_CTX *ctx, fr_value_box_t const *data, char quo
                break;
 
        case FR_TYPE_BOOL:
-               p = talloc_typed_strdup(ctx, data->datum.byte ? "yes" : "no");
+               p = talloc_typed_strdup(ctx, data->datum.uint8 ? "yes" : "no");
                break;
 
        case FR_TYPE_UINT8:
-               p = talloc_typed_asprintf(ctx, "%u", data->datum.byte);
+               p = talloc_typed_asprintf(ctx, "%u", data->datum.uint8);
                break;
 
        case FR_TYPE_UINT16:
@@ -2859,7 +2859,7 @@ char *fr_value_box_asprint(TALLOC_CTX *ctx, fr_value_box_t const *data, char quo
                break;
 
        case FR_TYPE_UINT32:
-               p = talloc_typed_asprintf(ctx, "%u", data->datum.integer);
+               p = talloc_typed_asprintf(ctx, "%u", data->datum.uint32);
                break;
 
        case FR_TYPE_UINT64:
@@ -2880,7 +2880,7 @@ char *fr_value_box_asprint(TALLOC_CTX *ctx, fr_value_box_t const *data, char quo
                break;
 
        case FR_TYPE_FLOAT64:
-               p = talloc_typed_asprintf(ctx, "%g", data->datum.decimal);
+               p = talloc_typed_asprintf(ctx, "%g", data->datum.float64);
                break;
 
        case FR_TYPE_DATE:
@@ -2930,7 +2930,7 @@ char *fr_value_box_asprint(TALLOC_CTX *ctx, fr_value_box_t const *data, char quo
  * @param data to print.
  * @param quote char to escape in string output.
  * @return
- *     - The number of bytes written to the out buffer.
+ *     - The number of uint8s written to the out buffer.
  *     - A number >= outlen if truncation has occurred.
  */
 size_t fr_value_box_snprint(char *out, size_t outlen, fr_value_box_t const *data, char quote)
@@ -2958,7 +2958,7 @@ size_t fr_value_box_snprint(char *out, size_t outlen, fr_value_box_t const *data
 
                fr_value_box_cast(NULL, &tmp, FR_TYPE_UINT32, NULL, data);
 
-               dv = fr_dict_enum_by_da(NULL, data->datum.enumv, tmp.datum.integer);
+               dv = fr_dict_enum_by_da(NULL, data->datum.enumv, tmp.datum.uint32);
                if (dv) return strlcpy(out, dv->name, outlen);
        }
 
@@ -2995,13 +2995,13 @@ size_t fr_value_box_snprint(char *out, size_t outlen, fr_value_box_t const *data
                return fr_snprint(out, outlen, data->datum.strvalue, data->datum.length, quote);
 
        case FR_TYPE_UINT8:
-               return snprintf(out, outlen, "%u", data->datum.byte);
+               return snprintf(out, outlen, "%u", data->datum.uint8);
 
        case FR_TYPE_UINT16:
                return snprintf(out, outlen, "%u", data->datum.uint16);
 
        case FR_TYPE_UINT32:
-               return snprintf(out, outlen, "%u", data->datum.integer);
+               return snprintf(out, outlen, "%u", data->datum.uint32);
 
        case FR_TYPE_UINT64:
                return snprintf(out, outlen, "%" PRIu64, data->datum.uint64);
@@ -3059,7 +3059,7 @@ size_t fr_value_box_snprint(char *out, size_t outlen, fr_value_box_t const *data
        {
                size_t max;
 
-               /* Return the number of bytes we would have written */
+               /* Return the number of uint8s we would have written */
                len = (data->datum.length * 2) + 2;
                if (freespace <= 1) {
                        return len;
@@ -3080,7 +3080,7 @@ size_t fr_value_box_snprint(char *out, size_t outlen, fr_value_box_t const *data
                        return len;
                }
 
-               /* Get maximum number of bytes we can encode given freespace */
+               /* Get maximum number of uint8s we can encode given freespace */
                max = ((freespace % 2) ? freespace - 1 : freespace - 2) / 2;
                fr_bin2hex(out, data->datum.octets,
                           ((size_t)data->datum.length > max) ? max : (size_t)data->datum.length);
@@ -3099,7 +3099,7 @@ size_t fr_value_box_snprint(char *out, size_t outlen, fr_value_box_t const *data
                                data->datum.ether[4], data->datum.ether[5]);
 
        case FR_TYPE_FLOAT64:
-               return snprintf(out, outlen, "%g", data->datum.decimal);
+               return snprintf(out, outlen, "%g", data->datum.float64);
 
        /*
         *      Don't add default here
@@ -3122,6 +3122,6 @@ size_t fr_value_box_snprint(char *out, size_t outlen, fr_value_box_t const *data
 
        if (a) strlcpy(out, a, outlen);
 
-       return len;     /* Return the number of bytes we would of written (for truncation detection) */
+       return len;     /* Return the number of uint8s we would of written (for truncation detection) */
 }
 
index fad134c1f72e8595f746703c18cbfbccbb64a220..64e82c175bf07d5665a040657dcb4377e81f3ecf 100644 (file)
@@ -86,7 +86,7 @@ rlm_rcode_t rad_accounting(REQUEST *request)
                 */
                vp = fr_pair_find_by_num(request->control, 0, PW_ACCT_TYPE, TAG_ANY);
                if (vp) {
-                       acct_type = vp->vp_integer;
+                       acct_type = vp->vp_uint32;
                        DEBUG2("  Found Acct-Type %s",
                               fr_dict_enum_name_by_da(NULL, vp->da, acct_type));
                }
index b5e5e411edc374a937517f29c039425b17a4005e..4effa966f9e48c08f3a6a83630d7861673343525 100644 (file)
@@ -46,7 +46,7 @@ char *auth_name(char *buf, size_t buflen, REQUEST *request, bool do_cli)
        }
 
        if ((pair = fr_pair_find_by_num(request->packet->vps, 0, PW_NAS_PORT, TAG_ANY)) != NULL) {
-               port = pair->vp_integer;
+               port = pair->vp_uint32;
        }
 
        if (request->packet->dst_port == 0) {
@@ -115,7 +115,7 @@ static int rad_authlog(char const *msg, REQUEST *request, int goodpass)
                        if (auth_type) {
                                snprintf(clean_password, sizeof(clean_password),
                                         "<via Auth-Type = %s>",
-                                        fr_dict_enum_name_by_da(NULL, auth_type->da, auth_type->vp_integer));
+                                        fr_dict_enum_name_by_da(NULL, auth_type->da, auth_type->vp_uint32));
                        } else {
                                strcpy(clean_password, "<no User-Password attribute>");
                        }
@@ -181,7 +181,7 @@ static int CC_HINT(nonnull) rad_check_password(REQUEST *request)
         */
        fr_pair_cursor_init(&cursor, &request->control);
        while ((auth_type_pair = fr_pair_cursor_next_by_num(&cursor, 0, PW_AUTH_TYPE, TAG_ANY))) {
-               auth_type = auth_type_pair->vp_integer;
+               auth_type = auth_type_pair->vp_uint32;
                auth_type_count++;
 
                RDEBUG2("Using 'Auth-Type = %s' for authenticate {...}", fr_dict_enum_name_by_da(NULL, auth_type_pair->da, auth_type));
@@ -295,7 +295,7 @@ rlm_rcode_t rad_postauth(REQUEST *request)
         */
        vp = fr_pair_find_by_num(request->control, 0, PW_POST_AUTH_TYPE, TAG_ANY);
        if (vp) {
-               postauth_type = vp->vp_integer;
+               postauth_type = vp->vp_uint32;
                RDEBUG2("Using Post-Auth-Type %s",
                        fr_dict_enum_name_by_da(NULL, vp->da, postauth_type));
        }
@@ -380,7 +380,7 @@ rlm_rcode_t rad_authenticate(REQUEST *request)
                        tmp = radius_pair_create(request,
                                                &request->control,
                                                PW_AUTH_TYPE, 0);
-                       if (tmp) tmp->vp_integer = PW_AUTH_TYPE_ACCEPT;
+                       if (tmp) tmp->vp_uint32 = PW_AUTH_TYPE_ACCEPT;
                        rcode = RLM_MODULE_OK;
                        goto authenticate;
 
@@ -462,7 +462,7 @@ autz_redo:
        if (!autz_retry) {
                tmp = fr_pair_find_by_num(request->control, 0, PW_AUTZ_TYPE, TAG_ANY);
                if (tmp) {
-                       autz_type = tmp->vp_integer;
+                       autz_type = tmp->vp_uint32;
                        RDEBUG2("Using Autz-Type %s",
                                fr_dict_enum_name_by_da(NULL, tmp->da, autz_type));
                        autz_retry = 1;
@@ -574,7 +574,7 @@ authenticate:
 
                tmp = fr_pair_find_by_num(request->control, 0, PW_SESSION_TYPE, TAG_ANY);
                if (tmp) {
-                       session_type = tmp->vp_integer;
+                       session_type = tmp->vp_uint32;
                        RDEBUG2("Using Session-Type %s",
                                fr_dict_enum_name_by_da(NULL, tmp->da, session_type));
                }
@@ -584,7 +584,7 @@ authenticate:
                 *      for the Simultaneous-Use parameter.
                 */
                if (request->username &&
-                   (r = process_checksimul(session_type, request, check_item->vp_integer)) != 0) {
+                   (r = process_checksimul(session_type, request, check_item->vp_uint32)) != 0) {
                        char mpp_ok = 0;
 
                        if (r == 2){
@@ -593,15 +593,15 @@ authenticate:
 
                                if ((port_limit = fr_pair_find_by_num(request->reply->vps, 0, PW_PORT_LIMIT,
                                                                      TAG_ANY)) != NULL &&
-                                       port_limit->vp_integer > check_item->vp_integer){
+                                       port_limit->vp_uint32 > check_item->vp_uint32){
                                        RDEBUG2("MPP is OK");
                                        mpp_ok = 1;
                                }
                        }
                        if (!mpp_ok){
-                               if (check_item->vp_integer > 1) {
+                               if (check_item->vp_uint32 > 1) {
                                        snprintf(umsg, sizeof(umsg), "%s (%u)", main_config.denied_msg,
-                                                check_item->vp_integer);
+                                                check_item->vp_uint32);
                                } else {
                                        strlcpy(umsg, main_config.denied_msg, sizeof(umsg));
                                }
@@ -616,7 +616,7 @@ authenticate:
                                pair_make_reply("Reply-Message", umsg, T_OP_SET);
 
                                snprintf(logstr, sizeof(logstr), "Multiple logins (max %d) %s",
-                                       check_item->vp_integer,
+                                       check_item->vp_uint32,
                                        r == 2 ? "[MPP attempt]" : "");
                                rad_authlog(logstr, request, 1);
 
index ee307afcda6f628adc16a7371bbd353b9db109fe..d4f7cbc460a8cecdd21429b415c056732b65fe75 100644 (file)
@@ -1356,7 +1356,7 @@ RADCLIENT *client_afrom_request(RADCLIENT_LIST *clients, REQUEST *request)
                        CONF_PARSER const *parse;
 
                        pi = (int *) ((bool *) ((char *) c + dynamic_config[i].offset));
-                       *pi = vp->vp_integer;
+                       *pi = vp->vp_uint32;
 
                        /*
                         *      Same nastiness as above.
index 315c9506fa7c883454009008d17e9220fd0e459e..626c7e1dd930d9f9a183661e25ec4a59bd15fd67 100644 (file)
@@ -2088,7 +2088,7 @@ rlm_rcode_t rad_coa_recv(REQUEST *request)
                 */
                vp = fr_pair_find_by_num(request->packet->vps, 0, PW_SERVICE_TYPE, TAG_ANY);
                if (request->packet->code == PW_CODE_COA_REQUEST) {
-                       if (vp && (vp->vp_integer == PW_AUTHORIZE_ONLY)) {
+                       if (vp && (vp->vp_uint32 == PW_AUTHORIZE_ONLY)) {
                                vp = fr_pair_find_by_num(request->packet->vps, 0, PW_STATE, TAG_ANY);
                                if (!vp || (vp->vp_length == 0)) {
                                        REDEBUG("CoA-Request with Service-Type = Authorize-Only MUST "
index 906c3dded0bd15d2c5400ef3c789969cae7d3fbf..a9fb9dfc7250223d07e0a2e17fe02d1353ce0947 100644 (file)
@@ -183,13 +183,13 @@ int radius_compare_vps(UNUSED REQUEST *request, VALUE_PAIR *check, VALUE_PAIR *v
                        break;
 
                case FR_TYPE_UINT8:
-                       ret = vp->vp_byte - check->vp_byte;
+                       ret = vp->vp_uint8 - check->vp_uint8;
                        break;
                case FR_TYPE_UINT16:
                        ret = vp->vp_short - check->vp_short;
                        break;
                case FR_TYPE_UINT32:
-                       ret = vp->vp_integer - check->vp_integer;
+                       ret = vp->vp_uint32 - check->vp_uint32;
                        break;
 
                case FR_TYPE_UINT64:
index ba84de9e42256d4add9bb62b013d599922e3b291..aba35c8faf793db6a0092af5255faf54d7887a32 100644 (file)
@@ -1167,11 +1167,11 @@ static void request_finish(REQUEST *request, fr_state_action_t action)
         */
        vp = fr_pair_find_by_num(request->control, 0, PW_RESPONSE_PACKET_TYPE, TAG_ANY);
        if (vp) {
-               if (vp->vp_integer == 256) {
+               if (vp->vp_uint32 == 256) {
                        RDEBUG2("Not responding to request");
                        request->reply->code = 0;
                } else {
-                       request->reply->code = vp->vp_integer;
+                       request->reply->code = vp->vp_uint32;
                }
        }
        /*
@@ -1180,7 +1180,7 @@ static void request_finish(REQUEST *request, fr_state_action_t action)
        else if (request->packet->code == PW_CODE_ACCESS_REQUEST) {
                if (request->reply->code == 0) {
                        vp = fr_pair_find_by_num(request->control, 0, PW_AUTH_TYPE, TAG_ANY);
-                       if (!vp || (vp->vp_integer != 5)) {
+                       if (!vp || (vp->vp_uint32 != 5)) {
                                RDEBUG2("There was no response configured: "
                                        "rejecting request");
                        }
@@ -1308,8 +1308,8 @@ static void request_finish(REQUEST *request, fr_state_action_t action)
 
                vp = fr_pair_find_by_num(request->reply->vps, 0, PW_FREERADIUS_RESPONSE_DELAY, TAG_ANY);
                if (vp) {
-                       if (vp->vp_integer <= 10) {
-                               request->response_delay.tv_sec = vp->vp_integer;
+                       if (vp->vp_uint32 <= 10) {
+                               request->response_delay.tv_sec = vp->vp_uint32;
                        } else {
                                request->response_delay.tv_sec = 10;
                        }
@@ -1317,9 +1317,9 @@ static void request_finish(REQUEST *request, fr_state_action_t action)
                } else {
                        vp = fr_pair_find_by_num(request->reply->vps, 0, PW_FREERADIUS_RESPONSE_DELAY_USEC, TAG_ANY);
                        if (vp) {
-                               if (vp->vp_integer <= 10 * USEC) {
-                                       request->response_delay.tv_sec = vp->vp_integer / USEC;
-                                       request->response_delay.tv_usec = vp->vp_integer % USEC;
+                               if (vp->vp_uint32 <= 10 * USEC) {
+                                       request->response_delay.tv_sec = vp->vp_uint32 / USEC;
+                                       request->response_delay.tv_usec = vp->vp_uint32 % USEC;
                                } else {
                                        request->response_delay.tv_sec = 10;
                                        request->response_delay.tv_usec = 0;
@@ -2276,7 +2276,7 @@ static int process_proxy_reply(REQUEST *request, RADIUS_PACKET *reply)
 
                        if (dval) {
                                vp = radius_pair_create(request, &request->control, PW_POST_PROXY_TYPE, 0);
-                               vp->vp_integer = dval->value;
+                               vp->vp_uint32 = dval->value;
                        }
                        break;
 
@@ -2285,7 +2285,7 @@ static int process_proxy_reply(REQUEST *request, RADIUS_PACKET *reply)
                }
        }
 
-       if (vp) RDEBUG2("Found Post-Proxy-Type %s", fr_dict_enum_name_by_da(NULL, vp->da, vp->vp_integer));
+       if (vp) RDEBUG2("Found Post-Proxy-Type %s", fr_dict_enum_name_by_da(NULL, vp->da, vp->vp_uint32));
 
        /*
         *      Remove it from the proxy hash, if there's no reply, or
@@ -2304,12 +2304,12 @@ static int process_proxy_reply(REQUEST *request, RADIUS_PACKET *reply)
 
                RDEBUG2("server %s {", request->server);
                RINDENT();
-               rcode = process_post_proxy(vp ? vp->vp_integer : 0, request);
+               rcode = process_post_proxy(vp ? vp->vp_uint32 : 0, request);
                REXDENT();
                RDEBUG2("}");
                request->server = old_server;
        } else {
-               rcode = process_post_proxy(vp ? vp->vp_integer : 0, request);
+               rcode = process_post_proxy(vp ? vp->vp_uint32 : 0, request);
        }
 
        switch (rcode) {
@@ -2546,7 +2546,7 @@ static int setup_post_proxy_fail(REQUEST *request)
        vp = fr_pair_find_by_num(request->control, 0, PW_POST_PROXY_TYPE, TAG_ANY);
        if (!vp) vp = radius_pair_create(request, &request->control,
                                        PW_POST_PROXY_TYPE, 0);
-       vp->vp_integer = dval->value;
+       vp->vp_uint32 = dval->value;
 
        return 1;
 }
@@ -2694,9 +2694,9 @@ static void proxy_no_reply(REQUEST *request, fr_state_action_t action)
                         *      one.
                         */
                        vp = fr_pair_find_by_num(request->control, 0, PW_RESPONSE_PACKET_TYPE, TAG_ANY);
-                       if (vp && (vp->vp_integer != 256)) {
+                       if (vp && (vp->vp_uint32 != 256)) {
                                request->proxy->reply = fr_radius_alloc_reply(request, request->proxy->packet);
-                               request->proxy->reply->code = vp->vp_integer;
+                               request->proxy->reply->code = vp->vp_uint32;
                                fr_pair_delete_by_num(&request->control, 0, PW_RESPONSE_PACKET_TYPE, TAG_ANY);
                        }
 
@@ -2998,7 +2998,7 @@ static int request_will_proxy(REQUEST *request)
                        }
 
                } else {
-                       dst_port = vp->vp_integer;
+                       dst_port = vp->vp_uint32;
                }
 
                /*
@@ -3109,11 +3109,11 @@ do_home:
         */
        vp = fr_pair_find_by_num(request->control, 0, PW_PRE_PROXY_TYPE, TAG_ANY);
        if (vp) {
-               fr_dict_enum_t const *dval = fr_dict_enum_by_da(NULL, vp->da, vp->vp_integer);
+               fr_dict_enum_t const *dval = fr_dict_enum_by_da(NULL, vp->da, vp->vp_uint32);
                /* Must be a validation issue */
                rad_assert(dval);
                RDEBUG2("Found Pre-Proxy-Type %s", dval->name);
-               pre_proxy_type = vp->vp_integer;
+               pre_proxy_type = vp->vp_uint32;
        }
 
        /*
@@ -3363,7 +3363,7 @@ static int request_proxy_anew(REQUEST *request)
                        struct timeval now;
 
                        gettimeofday(&now, NULL);
-                       vp->vp_integer += now.tv_sec - request->proxy->packet->timestamp.tv_sec;
+                       vp->vp_uint32 += now.tv_sec - request->proxy->packet->timestamp.tv_sec;
                }
        }
 #endif
@@ -4135,7 +4135,7 @@ static void request_coa_originate(REQUEST *request)
        }
 
        if (vp) {
-               if (vp->vp_integer == 0) {
+               if (vp->vp_uint32 == 0) {
                fail:
                        TALLOC_FREE(request->coa);
                        return;
@@ -4195,7 +4195,7 @@ static void request_coa_originate(REQUEST *request)
                char buffer[INET6_ADDRSTRLEN];
 
                vp = fr_pair_find_by_num(coa->proxy->packet->vps, 0, PW_PACKET_DST_PORT, TAG_ANY);
-               if (vp) port = vp->vp_integer;
+               if (vp) port = vp->vp_uint32;
 
                coa->home_server = home_server_find(&ipaddr, port, IPPROTO_UDP);
                if (!coa->home_server) {
@@ -4208,15 +4208,15 @@ static void request_coa_originate(REQUEST *request)
 
        vp = fr_pair_find_by_num(coa->proxy->packet->vps, 0, PW_PACKET_TYPE, TAG_ANY);
        if (vp) {
-               switch (vp->vp_integer) {
+               switch (vp->vp_uint32) {
                case PW_CODE_COA_REQUEST:
                case PW_CODE_DISCONNECT_REQUEST:
-                       coa->proxy->packet->code = vp->vp_integer;
+                       coa->proxy->packet->code = vp->vp_uint32;
                        break;
 
                default:
                        DEBUG("Cannot set CoA Packet-Type to code %d",
-                             vp->vp_integer);
+                             vp->vp_uint32);
                        goto fail;
                }
        }
@@ -4245,11 +4245,11 @@ static void request_coa_originate(REQUEST *request)
         */
        vp = fr_pair_find_by_num(request->control, 0, PW_PRE_PROXY_TYPE, TAG_ANY);
        if (vp) {
-               fr_dict_enum_t const *dval = fr_dict_enum_by_da(NULL, vp->da, vp->vp_integer);
+               fr_dict_enum_t const *dval = fr_dict_enum_by_da(NULL, vp->da, vp->vp_uint32);
                /* Must be a validation issue */
                rad_assert(dval);
                RDEBUG2("Found Pre-Proxy-Type %s", dval->name);
-               pre_proxy_type = vp->vp_integer;
+               pre_proxy_type = vp->vp_uint32;
        }
 
        if (coa->home_pool && coa->home_pool->virtual_server) {
index c904611945bddcbd7b6ec26b379bb9503afd1503..328ccc53c4b0959b6496dd64af4c011e709c9466 100644 (file)
@@ -407,7 +407,7 @@ static int radclient_init(TALLOC_CTX *ctx, rc_file_pair_t *files)
                                case PW_RESPONSE_PACKET_TYPE:
                                case PW_PACKET_TYPE:
                                        fr_pair_cursor_remove(&cursor); /* so we don't break the filter */
-                                       request->filter_code = vp->vp_integer;
+                                       request->filter_code = vp->vp_uint32;
                                        talloc_free(vp);
 
                                default:
@@ -446,15 +446,15 @@ static int radclient_init(TALLOC_CTX *ctx, rc_file_pair_t *files)
                         *      the attributes read from the file.
                         */
                        case PW_PACKET_TYPE:
-                               request->packet->code = vp->vp_integer;
+                               request->packet->code = vp->vp_uint32;
                                break;
 
                        case PW_RESPONSE_PACKET_TYPE:
-                               request->filter_code = vp->vp_integer;
+                               request->filter_code = vp->vp_uint32;
                                break;
 
                        case PW_PACKET_DST_PORT:
-                               request->packet->dst_port = (vp->vp_integer & 0xffff);
+                               request->packet->dst_port = (vp->vp_uint32 & 0xffff);
                                break;
 
                        case PW_PACKET_DST_IP_ADDRESS:
@@ -463,12 +463,12 @@ static int radclient_init(TALLOC_CTX *ctx, rc_file_pair_t *files)
                                break;
 
                        case PW_PACKET_SRC_PORT:
-                               if ((vp->vp_integer < 1024) ||
-                                   (vp->vp_integer > 65535)) {
-                                       ERROR("Invalid value '%u' for Packet-Src-Port", vp->vp_integer);
+                               if ((vp->vp_uint32 < 1024) ||
+                                   (vp->vp_uint32 > 65535)) {
+                                       ERROR("Invalid value '%u' for Packet-Src-Port", vp->vp_uint32);
                                        goto error;
                                }
-                               request->packet->src_port = (vp->vp_integer & 0xffff);
+                               request->packet->src_port = (vp->vp_uint32 & 0xffff);
                                break;
 
                        case PW_PACKET_SRC_IP_ADDRESS:
index aa3f388cd33fed5f34a6b34d845824ace1a578af..6d8b4dd534aa7d595ac3dd27c28b3e393c89033b 100644 (file)
@@ -2539,7 +2539,7 @@ int main(int argc, char *argv[])
                type = fr_pair_cursor_next_by_num(&cursor, 0, PW_PACKET_TYPE, TAG_ANY);
                if (type) {
                        fr_pair_cursor_remove(&cursor);
-                       conf->filter_request_code = type->vp_integer;
+                       conf->filter_request_code = type->vp_uint32;
                        talloc_free(type);
                }
        }
@@ -2556,7 +2556,7 @@ int main(int argc, char *argv[])
                type = fr_pair_cursor_next_by_num(&cursor, 0, PW_PACKET_TYPE, TAG_ANY);
                if (type) {
                        fr_pair_cursor_remove(&cursor);
-                       conf->filter_response_code = type->vp_integer;
+                       conf->filter_response_code = type->vp_uint32;
                        talloc_free(type);
                }
        }
index 7b72d4aaee3d884cd61c18675bc79e1c49c7f685..003b8801858557c0ddc70cfc6bb37a9855245f44 100644 (file)
@@ -251,7 +251,7 @@ static ssize_t radsnmp_pair_from_oid(TALLOC_CTX *ctx, radsnmp_conf_t *conf, vp_c
                 *      the index number should be available in attr.
                 */
                vp = fr_pair_afrom_da(ctx, index_attr);
-               vp->vp_integer = attr;
+               vp->vp_uint32 = attr;
 
                fr_pair_cursor_append(cursor, vp);
        }
@@ -333,7 +333,7 @@ static ssize_t radsnmp_pair_from_oid(TALLOC_CTX *ctx, radsnmp_conf_t *conf, vp_c
        }
 
        vp = fr_pair_afrom_da(ctx, conf->snmp_type);
-       vp->vp_integer = type;
+       vp->vp_uint32 = type;
 
        fr_pair_cursor_append(cursor, vp);
 
@@ -445,7 +445,7 @@ static int radsnmp_get_response(int fd,
                         *      Add the value of the index attribute as the next
                         *      OID component.
                         */
-                       len = snprintf(p, end - p, ".%i.", vp->vp_integer);
+                       len = snprintf(p, end - p, ".%i.", vp->vp_uint32);
                        if (is_truncated(len, end - p)) goto oob;
 
                        p += len;
@@ -727,7 +727,7 @@ static int radsnmp_send_recv(radsnmp_conf_t *conf, int fd)
                        ERROR("Failed allocating SNMP operation attribute");
                        return EXIT_FAILURE;
                }
-               vp->vp_integer = (unsigned int)command; /* Commands must match dictionary */
+               vp->vp_uint32 = (unsigned int)command;  /* Commands must match dictionary */
                fr_pair_cursor_append(&cursor, vp);
 
                /*
index f6a6b0d2217d1d05294039a01dc469896035cea1..372dad51f479f7f55cdbf79c6d6afec2eaa29a2f 100644 (file)
@@ -60,7 +60,7 @@ int session_zap(REQUEST *request, uint32_t nasaddr, uint32_t nas_port,
                fr_pair_add(&(stopreq->packet->vps), vp); \
        } while(0)
 
-#define INTPAIR(n,v) PAIR(n,v,vp_integer)
+#define INTPAIR(n,v) PAIR(n,v,vp_uint32)
 
 #define IPPAIR(n,v) PAIR(n,v,vp_ipv4addr)
 
index 51f78d64a1c3c9de628a06e6370541923e823599..d141c1c6d8245b525aa569e81fad35686446646a 100644 (file)
@@ -100,8 +100,8 @@ static int snmp_value_uptime_get(UNUSED TALLOC_CTX *ctx, fr_value_box_t *out, ND
        gettimeofday(&now, NULL);
        fr_timeval_subtract(&diff, &now, &uptime);
 
-       out->datum.integer = diff.tv_sec * 100;
-       out->datum.integer += diff.tv_usec / 10000;
+       out->datum.uint32 = diff.tv_sec * 100;
+       out->datum.uint32 += diff.tv_usec / 10000;
 
        return 0;
 }
@@ -117,8 +117,8 @@ static int snmp_config_reset_time_get(UNUSED TALLOC_CTX *ctx, fr_value_box_t *ou
        gettimeofday(&now, NULL);
        fr_timeval_subtract(&diff, &now, &reset_time);
 
-       out->datum.integer = diff.tv_sec * 100;
-       out->datum.integer += diff.tv_usec / 10000;
+       out->datum.uint32 = diff.tv_sec * 100;
+       out->datum.uint32 += diff.tv_usec / 10000;
 
        return 0;
 }
@@ -128,7 +128,7 @@ static int snmp_config_reset_get(UNUSED TALLOC_CTX *ctx, fr_value_box_t *out, ND
 {
        rad_assert(map->da->type == FR_TYPE_UINT32);
 
-       out->datum.integer = reset_state;
+       out->datum.uint32 = reset_state;
 
        return 0;
 }
@@ -137,7 +137,7 @@ static int snmp_config_reset_set(NDEBUG_UNUSED fr_snmp_map_t const *map, UNUSED
 {
        rad_assert(map->da->type == FR_TYPE_UINT32);
 
-       switch (in->datum.integer) {
+       switch (in->datum.uint32) {
        case PW_RADIUS_AUTH_SERV_CONFIG_RESET_VALUE_RESET:
                radius_signal_self(RADIUS_SIGNAL_SELF_HUP);
                gettimeofday(&reset_time, NULL);
@@ -154,7 +154,7 @@ static int snmp_auth_stats_offset_get(UNUSED TALLOC_CTX *ctx, fr_value_box_t *ou
 {
        rad_assert(map->da->type == FR_TYPE_UINT32);
 
-       out->datum.integer = *(uint32_t *)((uint8_t *)(&radius_auth_stats) + map->offset);
+       out->datum.uint32 = *(uint32_t *)((uint8_t *)(&radius_auth_stats) + map->offset);
 
        return 0;
 }
@@ -182,7 +182,7 @@ static int snmp_client_index_get(UNUSED TALLOC_CTX *ctx, fr_value_box_t *out,
 
        rad_assert(client);
 
-       out->datum.integer = client->number + 1;                /* Clients indexed from 0 */
+       out->datum.uint32 = client->number + 1;         /* Clients indexed from 0 */
 
        return 0;
 }
@@ -233,7 +233,7 @@ static int snmp_auth_client_stats_offset_get(UNUSED TALLOC_CTX *ctx, fr_value_bo
        rad_assert(client);
        rad_assert(map->da->type == FR_TYPE_UINT32);
 
-       out->datum.integer = *(uint32_t *)((uint8_t *)(&client->auth) + map->offset);
+       out->datum.uint32 = *(uint32_t *)((uint8_t *)(&client->auth) + map->offset);
 
        return 0;
 }
@@ -574,7 +574,7 @@ static ssize_t snmp_process_index(vp_cursor_t *out, REQUEST *request,
                }
 
                vp = fr_pair_afrom_da(request->reply, da);
-               vp->vp_integer = i;
+               vp->vp_uint32 = i;
                fr_pair_cursor_prepend(out, vp);
 
                return 0;                       /* done */
@@ -624,7 +624,7 @@ static ssize_t snmp_process_index_attr(vp_cursor_t *out, REQUEST *request,
         *      Get the index from the index attribute's value.
         */
        vp = fr_pair_cursor_current(cursor);
-       index_num = vp->vp_integer;
+       index_num = vp->vp_uint32;
 
        /*
         *      Advance the cursor to the next index attribute
@@ -775,7 +775,7 @@ static ssize_t snmp_process_leaf(vp_cursor_t *out, REQUEST *request,
                fr_pair_cursor_append(out, vp);
 
                vp = fr_pair_afrom_da(request->reply, fr_snmp_type);
-               vp->vp_integer = map_p->type;
+               vp->vp_uint32 = map_p->type;
                fr_pair_cursor_append(out, vp);
        }
                return 0;
@@ -786,7 +786,7 @@ static ssize_t snmp_process_leaf(vp_cursor_t *out, REQUEST *request,
 
                if (!map_p->set || (map_p->type == PW_FREERADIUS_SNMP_TYPE_OBJECT)) {
                        vp = fr_pair_afrom_da(request->reply, fr_snmp_failure);
-                       vp->vp_integer = PW_FREERADIUS_SNMP_FAILURE_VALUE_NOT_WRITABLE;
+                       vp->vp_uint32 = PW_FREERADIUS_SNMP_FAILURE_VALUE_NOT_WRITABLE;
                        fr_pair_cursor_append(out, vp);
                        return 0;
                }
@@ -800,7 +800,7 @@ static ssize_t snmp_process_leaf(vp_cursor_t *out, REQUEST *request,
                case PW_FREERADIUS_SNMP_FAILURE_VALUE_WRONG_VALUE:
                case PW_FREERADIUS_SNMP_FAILURE_VALUE_INCONSISTENT_VALUE:
                        vp = fr_pair_afrom_da(request->reply, fr_snmp_failure);
-                       vp->vp_integer = -(ret);
+                       vp->vp_uint32 = -(ret);
                        fr_pair_cursor_append(out, vp);
                        break;
 
@@ -963,7 +963,7 @@ int fr_snmp_process(REQUEST *request)
                        return -1;
                }
 
-               switch (op->vp_integer) {
+               switch (op->vp_uint32) {
                case PW_FREERADIUS_SNMP_OPERATION_VALUE_PING:
                case PW_FREERADIUS_SNMP_OPERATION_VALUE_GET:
                case PW_FREERADIUS_SNMP_OPERATION_VALUE_GETNEXT:
@@ -971,7 +971,7 @@ int fr_snmp_process(REQUEST *request)
                        break;
 
                default:
-                       ERROR("Invalid operation %u", vp->vp_integer);
+                       ERROR("Invalid operation %u", vp->vp_uint32);
                        return -1;
                }
 
@@ -979,7 +979,7 @@ int fr_snmp_process(REQUEST *request)
                 *      Returns depth (as negative integer) at which the error occurred
                 */
                ret = snmp_process(&out_cursor, request, tlv_stack, depth,
-                                  &request_cursor, snmp_iso, NULL, op->vp_integer);
+                                  &request_cursor, snmp_iso, NULL, op->vp_uint32);
                if (ret < 0) {
                        fr_pair_list_free(&head);
 
index 16013ec2805fb4a532e68f9e9cc216dba3204e05..46358753ceebd494decd6d638291fa05b967149e 100644 (file)
@@ -169,32 +169,32 @@ static int eap_peap_soh_mstlv(REQUEST *request, uint8_t const *p, unsigned int d
                        vp = pair_make_request("SoH-MS-Machine-OS-version", NULL, T_OP_EQ);
                        if (!vp) return 0;
 
-                       vp->vp_integer = soh_pull_be_32(p); p+=4;
+                       vp->vp_uint32 = soh_pull_be_32(p); p+=4;
 
                        vp = pair_make_request("SoH-MS-Machine-OS-release", NULL, T_OP_EQ);
                        if (!vp) return 0;
 
-                       vp->vp_integer = soh_pull_be_32(p); p+=4;
+                       vp->vp_uint32 = soh_pull_be_32(p); p+=4;
 
                        vp = pair_make_request("SoH-MS-Machine-OS-build", NULL, T_OP_EQ);
                        if (!vp) return 0;
 
-                       vp->vp_integer = soh_pull_be_32(p); p+=4;
+                       vp->vp_uint32 = soh_pull_be_32(p); p+=4;
 
                        vp = pair_make_request("SoH-MS-Machine-SP-version", NULL, T_OP_EQ);
                        if (!vp) return 0;
 
-                       vp->vp_integer = soh_pull_be_16(p); p+=2;
+                       vp->vp_uint32 = soh_pull_be_16(p); p+=2;
 
                        vp = pair_make_request("SoH-MS-Machine-SP-release", NULL, T_OP_EQ);
                        if (!vp) return 0;
 
-                       vp->vp_integer = soh_pull_be_16(p); p+=2;
+                       vp->vp_uint32 = soh_pull_be_16(p); p+=2;
 
                        vp = pair_make_request("SoH-MS-Machine-Processor", NULL, T_OP_EQ);
                        if (!vp) return 0;
 
-                       vp->vp_integer = soh_pull_be_16(p); p+=2;
+                       vp->vp_uint32 = soh_pull_be_16(p); p+=2;
                        break;
 
                case 2:
@@ -294,7 +294,7 @@ static int eap_peap_soh_mstlv(REQUEST *request, uint8_t const *p, unsigned int d
                        vp = pair_make_request("SoH-MS-Machine-Role", NULL, T_OP_EQ);
                        if (!vp) return 0;
 
-                       vp->vp_integer = *p;
+                       vp->vp_uint32 = *p;
                        p++;
                        data_len -= 5;
                        break;
index 8bb34873d88abf7c5b8a77c72f00624b749abdd1..163a9c01b40afd161c74fc256ff71872cefbe75f 100644 (file)
@@ -452,7 +452,7 @@ static void request_stats_addvp(REQUEST *request,
                if (!vp) continue;
 
                counter = *(fr_uint_t *) (((uint8_t *) stats) + table[i].offset);
-               vp->vp_integer = counter;
+               vp->vp_uint32 = counter;
        }
 }
 
@@ -468,13 +468,13 @@ void request_stats_reply(REQUEST *request)
        rad_assert(request->listener->type == RAD_LISTEN_NONE);
 
        flag = fr_pair_find_by_num(request->packet->vps, VENDORPEC_FREERADIUS, PW_FREERADIUS_STATISTICS_TYPE, TAG_ANY);
-       if (!flag || (flag->vp_integer == 0)) return;
+       if (!flag || (flag->vp_uint32 == 0)) return;
 
        /*
         *      Authentication.
         */
-       if (((flag->vp_integer & 0x01) != 0) &&
-           ((flag->vp_integer & 0xc0) == 0)) {
+       if (((flag->vp_uint32 & 0x01) != 0) &&
+           ((flag->vp_uint32 & 0xc0) == 0)) {
                request_stats_addvp(request, authvp, &radius_auth_stats);
        }
 
@@ -482,8 +482,8 @@ void request_stats_reply(REQUEST *request)
        /*
         *      Accounting
         */
-       if (((flag->vp_integer & 0x02) != 0) &&
-           ((flag->vp_integer & 0xc0) == 0)) {
+       if (((flag->vp_uint32 & 0x02) != 0) &&
+           ((flag->vp_uint32 & 0xc0) == 0)) {
                request_stats_addvp(request, acctvp, &radius_acct_stats);
        }
 #endif
@@ -492,8 +492,8 @@ void request_stats_reply(REQUEST *request)
        /*
         *      Proxied authentication requests.
         */
-       if (((flag->vp_integer & 0x04) != 0) &&
-           ((flag->vp_integer & 0x20) == 0)) {
+       if (((flag->vp_uint32 & 0x04) != 0) &&
+           ((flag->vp_uint32 & 0x20) == 0)) {
                request_stats_addvp(request, proxy_authvp, &proxy_auth_stats);
        }
 
@@ -501,8 +501,8 @@ void request_stats_reply(REQUEST *request)
        /*
         *      Proxied accounting requests.
         */
-       if (((flag->vp_integer & 0x08) != 0) &&
-           ((flag->vp_integer & 0x20) == 0)) {
+       if (((flag->vp_uint32 & 0x08) != 0) &&
+           ((flag->vp_uint32 & 0x20) == 0)) {
                request_stats_addvp(request, proxy_acctvp, &proxy_acct_stats);
        }
 #endif
@@ -511,7 +511,7 @@ void request_stats_reply(REQUEST *request)
        /*
         *      Internal server statistics
         */
-       if ((flag->vp_integer & 0x10) != 0) {
+       if ((flag->vp_uint32 & 0x10) != 0) {
                vp = radius_pair_create(request->reply, &request->reply->vps,
                                       PW_FREERADIUS_STATS_START_TIME, VENDORPEC_FREERADIUS);
                if (vp) vp->vp_date = start_time.tv_sec;
@@ -523,7 +523,7 @@ void request_stats_reply(REQUEST *request)
        /*
         *      For a particular client.
         */
-       if ((flag->vp_integer & 0x20) != 0) {
+       if ((flag->vp_uint32 & 0x20) != 0) {
                fr_ipaddr_t ipaddr;
                VALUE_PAIR *server_ip, *server_port = NULL;
                RADCLIENT *client = NULL;
@@ -542,7 +542,7 @@ void request_stats_reply(REQUEST *request)
                        if (server_port) {
                                ipaddr.af = AF_INET;
                                ipaddr.addr.v4.s_addr = server_ip->vp_ipv4addr;
-                               cl = listener_find_client_list(&ipaddr, server_port->vp_integer, IPPROTO_UDP);
+                               cl = listener_find_client_list(&ipaddr, server_port->vp_uint32, IPPROTO_UDP);
 
                                /*
                                 *      Not found: don't do anything
@@ -570,7 +570,7 @@ void request_stats_reply(REQUEST *request)
                         */
                } else if ((vp = fr_pair_find_by_num(request->packet->vps, VENDORPEC_FREERADIUS,
                                                     PW_FREERADIUS_STATS_CLIENT_NUMBER, TAG_ANY)) != NULL) {
-                       client = client_findbynumber(cl, vp->vp_integer);
+                       client = client_findbynumber(cl, vp->vp_uint32);
                }
 
                if (client) {
@@ -598,7 +598,7 @@ void request_stats_reply(REQUEST *request)
                                                               &request->reply->vps,
                                                               PW_FREERADIUS_STATS_CLIENT_NETMASK, VENDORPEC_FREERADIUS);
                                        if (vp) {
-                                               vp->vp_integer = client->ipaddr.prefix;
+                                               vp->vp_uint32 = client->ipaddr.prefix;
                                        }
                                }
                        }
@@ -612,12 +612,12 @@ void request_stats_reply(REQUEST *request)
                                        fr_pair_copy(request->reply, server_port));
                        }
 
-                       if ((flag->vp_integer & 0x01) != 0) {
+                       if ((flag->vp_uint32 & 0x01) != 0) {
                                request_stats_addvp(request, client_authvp,
                                                    &client->auth);
                        }
 #ifdef WITH_ACCOUNTING
-                       if ((flag->vp_integer & 0x02) != 0) {
+                       if ((flag->vp_uint32 & 0x02) != 0) {
                                request_stats_addvp(request, client_acctvp,
                                                    &client->acct);
                        }
@@ -628,8 +628,8 @@ void request_stats_reply(REQUEST *request)
        /*
         *      For a particular "listen" socket.
         */
-       if (((flag->vp_integer & 0x40) != 0) &&
-           ((flag->vp_integer & 0x03) != 0)) {
+       if (((flag->vp_uint32 & 0x40) != 0) &&
+           ((flag->vp_uint32 & 0x03) != 0)) {
                rad_listen_t *this;
                VALUE_PAIR *server_ip, *server_port;
                fr_ipaddr_t ipaddr;
@@ -649,7 +649,7 @@ void request_stats_reply(REQUEST *request)
                ipaddr.af = AF_INET;
                ipaddr.addr.v4.s_addr = server_ip->vp_ipv4addr;
                this = listener_find_byipaddr(&ipaddr,
-                                             server_port->vp_integer,
+                                             server_port->vp_uint32,
                                              IPPROTO_UDP);
 
                /*
@@ -662,14 +662,14 @@ void request_stats_reply(REQUEST *request)
                fr_pair_add(&request->reply->vps,
                        fr_pair_copy(request->reply, server_port));
 
-               if (((flag->vp_integer & 0x01) != 0) &&
+               if (((flag->vp_uint32 & 0x01) != 0) &&
                    ((request->listener->type == RAD_LISTEN_AUTH) ||
                     (request->listener->type == RAD_LISTEN_NONE))) {
                        request_stats_addvp(request, authvp, &this->stats);
                }
 
 #ifdef WITH_ACCOUNTING
-               if (((flag->vp_integer & 0x02) != 0) &&
+               if (((flag->vp_uint32 & 0x02) != 0) &&
                    ((request->listener->type == RAD_LISTEN_ACCT) ||
                     (request->listener->type == RAD_LISTEN_NONE))) {
                        request_stats_addvp(request, acctvp, &this->stats);
@@ -681,8 +681,8 @@ void request_stats_reply(REQUEST *request)
        /*
         *      Home servers.
         */
-       if (((flag->vp_integer & 0x80) != 0) &&
-           ((flag->vp_integer & 0x03) != 0)) {
+       if (((flag->vp_uint32 & 0x80) != 0) &&
+           ((flag->vp_uint32 & 0x03) != 0)) {
                home_server_t *home;
                VALUE_PAIR *server_ip, *server_port;
                fr_ipaddr_t ipaddr;
@@ -704,7 +704,7 @@ void request_stats_reply(REQUEST *request)
 #endif
                ipaddr.af = AF_INET;
                ipaddr.addr.v4.s_addr = server_ip->vp_ipv4addr;
-               home = home_server_find(&ipaddr, server_port->vp_integer,
+               home = home_server_find(&ipaddr, server_port->vp_uint32,
                                        IPPROTO_UDP);
 
                /*
@@ -719,11 +719,11 @@ void request_stats_reply(REQUEST *request)
 
                vp = radius_pair_create(request->reply, &request->reply->vps,
                                       PW_FREERADIUS_STATS_SERVER_OUTSTANDING_REQUESTS, VENDORPEC_FREERADIUS);
-               if (vp) vp->vp_integer = home->currently_outstanding;
+               if (vp) vp->vp_uint32 = home->currently_outstanding;
 
                vp = radius_pair_create(request->reply, &request->reply->vps,
                                       PW_FREERADIUS_STATS_SERVER_STATE, VENDORPEC_FREERADIUS);
-               if (vp) vp->vp_integer = home->state;
+               if (vp) vp->vp_uint32 = home->state;
 
                if ((home->state == HOME_STATE_ALIVE) &&
                    (home->revive_time.tv_sec != 0)) {
@@ -737,15 +737,15 @@ void request_stats_reply(REQUEST *request)
                                vp = radius_pair_create(request->reply,
                                                       &request->reply->vps,
                                                       PW_FREERADIUS_SERVER_EMA_WINDOW, VENDORPEC_FREERADIUS);
-                               if (vp) vp->vp_integer = home->ema.window;
+                               if (vp) vp->vp_uint32 = home->ema.window;
                                vp = radius_pair_create(request->reply,
                                                       &request->reply->vps,
                                                       PW_FREERADIUS_SERVER_EMA_USEC_WINDOW_1, VENDORPEC_FREERADIUS);
-                               if (vp) vp->vp_integer = home->ema.ema1 / EMA_SCALE;
+                               if (vp) vp->vp_uint32 = home->ema.ema1 / EMA_SCALE;
                                vp = radius_pair_create(request->reply,
                                                       &request->reply->vps,
                                                       PW_FREERADIUS_SERVER_EMA_USEC_WINDOW_10, VENDORPEC_FREERADIUS);
-                               if (vp) vp->vp_integer = home->ema.ema10 / EMA_SCALE;
+                               if (vp) vp->vp_uint32 = home->ema.ema10 / EMA_SCALE;
 
                }
 
@@ -768,14 +768,14 @@ void request_stats_reply(REQUEST *request)
                                       PW_FREERADIUS_STATS_LAST_PACKET_SENT, VENDORPEC_FREERADIUS);
                if (vp) vp->vp_date = home->last_packet_sent;
 
-               if (((flag->vp_integer & 0x01) != 0) &&
+               if (((flag->vp_uint32 & 0x01) != 0) &&
                    (home->type == HOME_TYPE_AUTH)) {
                        request_stats_addvp(request, proxy_authvp,
                                            &home->stats);
                }
 
 #ifdef WITH_ACCOUNTING
-               if (((flag->vp_integer & 0x02) != 0) &&
+               if (((flag->vp_uint32 & 0x02) != 0) &&
                    (home->type == HOME_TYPE_ACCT)) {
                        request_stats_addvp(request, proxy_acctvp,
                                            &home->stats);
index 669a2e44ca435a0cf34af8032cd4c9936911d6f7..ab89a5a6f8638656dc3dada9112e38e985458f80 100644 (file)
@@ -80,7 +80,7 @@ static int tls_cache_attrs(REQUEST *request,
        vp = fr_pair_afrom_num(request, 0, PW_TLS_CACHE_ACTION);
        if (!vp) return -1;
 
-       vp->vp_integer = action;
+       vp->vp_uint32 = action;
        fr_pair_add(&request->control, vp);
        RINDENT();
        rdebug_pair(L_DBG_LVL_2, request, vp, "&control:");
@@ -114,7 +114,7 @@ int tls_cache_process(REQUEST *request, char const *virtual_server, int autz_typ
        vp = fr_pair_afrom_num(request, 0, PW_TLS_CACHE_ACTION);
        if (!vp) return -1;
 
-       vp->vp_integer = autz_type;
+       vp->vp_uint32 = autz_type;
 
        fr_pair_add(&request->control, vp);
        RINDENT();
@@ -536,7 +536,7 @@ int tls_cache_disable_cb(SSL *ssl,
        if (!session->allow_session_resumption) goto disable;
 
        vp = fr_pair_find_by_num(request->control, 0, PW_ALLOW_SESSION_RESUMPTION, TAG_ANY);
-       if (vp && (vp->vp_integer == 0)) {
+       if (vp && (vp->vp_uint32 == 0)) {
                RDEBUG2("&control:Allow-Session-Resumption == no, disabling session resumption");
        disable:
                SSL_CTX_remove_session(session->ctx, session->ssl_session);
index 7a836d9d637459158ebc18c9b3876d485ef58aa1..3f7c56f3dcd975b8a76fce73c4e520c2e8f9c747 100644 (file)
@@ -296,7 +296,7 @@ int tls_ocsp_check(REQUEST *request, SSL *ssl,
         *      Allow us to cache the OCSP verified state externally
         */
        vp = fr_pair_find_by_num(request->control, 0, PW_TLS_OCSP_CERT_VALID, TAG_ANY);
-       if (vp) switch (vp->vp_integer) {
+       if (vp) switch (vp->vp_uint32) {
        case 0: /* no */
                RDEBUG2("Found &control:TLS-OCSP-Cert-Valid = no, forcing OCSP failure");
                return OCSP_STATUS_FAILED;
@@ -549,7 +549,7 @@ int tls_ocsp_check(REQUEST *request, SSL *ssl,
                        RDEBUG2("Adding OCSP TTL attribute");
                        RINDENT();
                        vp = pair_make_request("TLS-OCSP-Next-Update", NULL, T_OP_SET);
-                       vp->vp_integer = next - now.tv_sec;
+                       vp->vp_uint32 = next - now.tv_sec;
                        rdebug_pair(L_DBG_LVL_2, request, vp, NULL);
                        REXDENT();
                } else {
@@ -605,7 +605,7 @@ finish:
                }
 
                vp = pair_make_request("TLS-OCSP-Cert-Valid", NULL, T_OP_SET);
-               vp->vp_integer = 1;     /* yes */
+               vp->vp_uint32 = 1;      /* yes */
                ocsp_status = OCSP_STATUS_OK;
 
                break;
@@ -614,7 +614,7 @@ finish:
        skipped:
                SSL_DRAIN_ERROR_QUEUE(RWDEBUG, "", ssl_log);
                vp = pair_make_request("TLS-OCSP-Cert-Valid", NULL, T_OP_SET);
-               vp->vp_integer = 2;     /* skipped */
+               vp->vp_uint32 = 2;      /* skipped */
                if (conf->softfail) {
                        RWDEBUG("Unable to check certificate: %s",
                                staple_response ?
@@ -634,7 +634,7 @@ finish:
        default:
                SSL_DRAIN_ERROR_QUEUE(REDEBUG, "", ssl_log);
                vp = pair_make_request("TLS-OCSP-Cert-Valid", NULL, T_OP_SET);
-               vp->vp_integer = 0;     /* no */
+               vp->vp_uint32 = 0;      /* no */
                REDEBUG("Failed to validate certificate");
                break;
        }
index 16094d9b947f84224d922f49b1b4583bf61bcc98..7f8be90802ce04703349ad50e06341899d3f8299 100644 (file)
@@ -1683,9 +1683,9 @@ tls_session_t *tls_session_init_server(TALLOC_CTX *ctx, fr_tls_conf_t *conf, REQ
         */
        session->mtu = conf->fragment_size;
        vp = fr_pair_find_by_num(request->packet->vps, 0, PW_FRAMED_MTU, TAG_ANY);
-       if (vp && (vp->vp_integer > 100) && (vp->vp_integer < session->mtu)) {
+       if (vp && (vp->vp_uint32 > 100) && (vp->vp_uint32 < session->mtu)) {
                RDEBUG2("Setting fragment_len from &Framed-MTU");
-               session->mtu = vp->vp_integer;
+               session->mtu = vp->vp_uint32;
        }
 
        if (conf->session_cache_server) session->allow_session_resumption = true; /* otherwise it's false */
index 2ffb02b4f7b971d3515d30d187c52292c112acac..cd455119162fa3cc1dd8de996cd6227c82b6e8ee 100644 (file)
@@ -226,11 +226,11 @@ static REQUEST *request_from_file(FILE *fp, RADCLIENT *client)
                         *      the attributes read from the file.
                         */
                case PW_PACKET_TYPE:
-                       request->packet->code = vp->vp_integer;
+                       request->packet->code = vp->vp_uint32;
                        break;
 
                case PW_PACKET_DST_PORT:
-                       request->packet->dst_port = (vp->vp_integer & 0xffff);
+                       request->packet->dst_port = (vp->vp_uint32 & 0xffff);
                        break;
 
                case PW_PACKET_DST_IP_ADDRESS:
@@ -239,7 +239,7 @@ static REQUEST *request_from_file(FILE *fp, RADCLIENT *client)
                        break;
 
                case PW_PACKET_SRC_PORT:
-                       request->packet->src_port = (vp->vp_integer & 0xffff);
+                       request->packet->src_port = (vp->vp_uint32 & 0xffff);
                        break;
 
                case PW_PACKET_SRC_IP_ADDRESS:
@@ -998,7 +998,7 @@ int main(int argc, char *argv[])
         *      Update the list with the response type.
         */
        vp = radius_pair_create(request->reply, &request->reply->vps, PW_RESPONSE_PACKET_TYPE, 0);
-       vp->vp_integer = request->reply->code;
+       vp->vp_uint32 = request->reply->code;
 
        {
                VALUE_PAIR const *failed[2];
index d59d45164c8e55e4e28f1135f553010f7176d326..2ad81387b3022c9a60c51805016c72b7a8e668c0 100644 (file)
@@ -198,7 +198,7 @@ static unlang_action_t unlang_load_balance(REQUEST *request, unlang_stack_t *sta
 
                                switch (g->vpt->tmpl_da->type) {
                                case FR_TYPE_UINT8:
-                                       start = ((uint32_t) vp->vp_byte) % g->num_children;
+                                       start = ((uint32_t) vp->vp_uint8) % g->num_children;
                                        break;
 
                                case FR_TYPE_UINT16:
@@ -206,7 +206,7 @@ static unlang_action_t unlang_load_balance(REQUEST *request, unlang_stack_t *sta
                                        break;
 
                                case FR_TYPE_UINT32:
-                                       start = vp->vp_integer % g->num_children;
+                                       start = vp->vp_uint32 % g->num_children;
                                        break;
 
                                case FR_TYPE_UINT64:
index 62737fba0dc0793ac298a0a0904153a045d97594..833092859bf265999f6cbd4dbc50fc6c6f3906e1 100644 (file)
@@ -211,13 +211,13 @@ static char *xlat_getvp(TALLOC_CTX *ctx, REQUEST *request, vp_tmpl_t const *vpt,
 
        case PW_PACKET_SRC_PORT:
                virtual = fr_pair_afrom_da(ctx, vpt->tmpl_da);
-               virtual->vp_integer = packet->src_port;
+               virtual->vp_uint32 = packet->src_port;
                vp = virtual;
                break;
 
        case PW_PACKET_DST_PORT:
                virtual = fr_pair_afrom_da(ctx, vpt->tmpl_da);
-               virtual->vp_integer = packet->dst_port;
+               virtual->vp_uint32 = packet->dst_port;
                vp = virtual;
                break;
        }
index 941bacdc7225b499e29ace19745f734bfb1b6e2f..f11730daabf5013154ae9fedfdf79115c9f09477 100644 (file)
@@ -123,13 +123,13 @@ static ssize_t xlat_integer(UNUSED TALLOC_CTX *ctx, char **out, size_t outlen,
                return snprintf(*out, outlen, "%u", htonl(vp->vp_ipv4addr));
 
        case FR_TYPE_UINT32:
-               return snprintf(*out, outlen, "%u", vp->vp_integer);
+               return snprintf(*out, outlen, "%u", vp->vp_uint32);
 
        case FR_TYPE_DATE:
                return snprintf(*out, outlen, "%u", vp->vp_date);
 
        case FR_TYPE_UINT8:
-               return snprintf(*out, outlen, "%u", (unsigned int) vp->vp_byte);
+               return snprintf(*out, outlen, "%u", (unsigned int) vp->vp_uint8);
 
        case FR_TYPE_UINT16:
                return snprintf(*out, outlen, "%u", (unsigned int) vp->vp_short);
index 5d94dd875beee432d63dfeceea351ab26421459d..33115bc634b83a4b66d5e7ebe6d7f4ee61befd3b 100644 (file)
@@ -754,7 +754,7 @@ open_file:
 
        packet->code = PW_CODE_ACCOUNTING_REQUEST;
        vp = fr_pair_find_by_num(packet->vps, 0, PW_PACKET_TYPE, TAG_ANY);
-       if (vp) packet->code = vp->vp_integer;
+       if (vp) packet->code = vp->vp_uint32;
 
        gettimeofday(&packet->timestamp, NULL);
 
@@ -818,7 +818,7 @@ open_file:
                 */
                vp = fr_pair_find_by_num(packet->vps, 0, PW_EVENT_TIMESTAMP, TAG_ANY);
                if (vp) {
-                       data->timestamp = vp->vp_integer;
+                       data->timestamp = vp->vp_uint32;
                }
 
                /*
@@ -832,7 +832,7 @@ open_file:
                        fr_pair_add(&packet->vps, vp);
                }
                if (data->timestamp != 0) {
-                       vp->vp_integer += time(NULL) - data->timestamp;
+                       vp->vp_uint32 += time(NULL) - data->timestamp;
                }
        }
 
@@ -845,7 +845,7 @@ open_file:
                rad_assert(vp != NULL);
                fr_pair_add(&packet->vps, vp);
        }
-       vp->vp_integer = data->tries;
+       vp->vp_uint32 = data->tries;
 
        data->entry_state = STATE_RUNNING;
        data->running = packet->timestamp.tv_sec;
index bd2a0c3e4b964199be81a5a970ebbe1045574fd9..9f32f8439d3c937c4ab20a3893370595a0a3cfa7 100644 (file)
@@ -749,7 +749,7 @@ static ssize_t decode_value_internal(TALLOC_CTX *ctx, vp_cursor_t *cursor, fr_di
        switch (da->type) {
        case FR_TYPE_UINT8:
                if (data_len != 1) goto raw;
-               vp->vp_byte = p[0];
+               vp->vp_uint8 = p[0];
                p++;
                break;
 
@@ -762,8 +762,8 @@ static ssize_t decode_value_internal(TALLOC_CTX *ctx, vp_cursor_t *cursor, fr_di
 
        case FR_TYPE_UINT32:
                if (data_len != 4) goto raw;
-               memcpy(&vp->vp_integer, p, 4);
-               vp->vp_integer = ntohl(vp->vp_integer);
+               memcpy(&vp->vp_uint32, p, 4);
+               vp->vp_uint32 = ntohl(vp->vp_uint32);
                p += 4;
                break;
 
@@ -1168,7 +1168,7 @@ int fr_dhcp_decode(RADIUS_PACKET *packet)
 
                switch (vp->vp_type) {
                case FR_TYPE_UINT8:
-                       vp->vp_byte = p[0];
+                       vp->vp_uint8 = p[0];
                        break;
 
                case FR_TYPE_UINT16:
@@ -1176,8 +1176,8 @@ int fr_dhcp_decode(RADIUS_PACKET *packet)
                        break;
 
                case FR_TYPE_UINT32:
-                       memcpy(&vp->vp_integer, p, 4);
-                       vp->vp_integer = ntohl(vp->vp_integer);
+                       memcpy(&vp->vp_uint32, p, 4);
+                       vp->vp_uint32 = ntohl(vp->vp_uint32);
                        break;
 
                case FR_TYPE_IPV4_ADDR:
@@ -1264,7 +1264,7 @@ int fr_dhcp_decode(RADIUS_PACKET *packet)
                 *      DHCP Opcode is request
                 */
                vp = fr_pair_find_by_num(head, DHCP_MAGIC_VENDOR, 256, TAG_ANY);
-               if (vp && vp->vp_integer == 3) {
+               if (vp && vp->vp_uint32 == 3) {
                        /*
                         *      Vendor is "MSFT 98"
                         */
@@ -1294,7 +1294,7 @@ int fr_dhcp_decode(RADIUS_PACKET *packet)
        maxms = fr_pair_find_by_num(packet->vps, DHCP_MAGIC_VENDOR, 57, TAG_ANY);
        mtu = fr_pair_find_by_num(packet->vps, DHCP_MAGIC_VENDOR, 26, TAG_ANY);
 
-       if (mtu && (mtu->vp_integer < DEFAULT_PACKET_SIZE)) {
+       if (mtu && (mtu->vp_uint32 < DEFAULT_PACKET_SIZE)) {
                fr_strerror_printf("Client says MTU is smaller than minimum permitted by the specification");
                return -1;
        }
@@ -1303,12 +1303,12 @@ int fr_dhcp_decode(RADIUS_PACKET *packet)
         *      Client says maximum message size is smaller than minimum permitted
         *      by the specification: fixing it.
         */
-       if (maxms && (maxms->vp_integer < DEFAULT_PACKET_SIZE)) maxms->vp_integer = DEFAULT_PACKET_SIZE;
+       if (maxms && (maxms->vp_uint32 < DEFAULT_PACKET_SIZE)) maxms->vp_uint32 = DEFAULT_PACKET_SIZE;
 
        /*
         *      Client says MTU is smaller than maximum message size: fixing it
         */
-       if (maxms && mtu && (maxms->vp_integer > mtu->vp_integer)) maxms->vp_integer = mtu->vp_integer;
+       if (maxms && mtu && (maxms->vp_uint32 > mtu->vp_uint32)) maxms->vp_uint32 = mtu->vp_uint32;
 
        return 0;
 }
@@ -1382,7 +1382,7 @@ static ssize_t encode_value(uint8_t *out, size_t outlen,
 
        switch (tlv_stack[depth]->type) {
        case FR_TYPE_UINT8:
-               p[0] = vp->vp_byte;
+               p[0] = vp->vp_uint8;
                p ++;
                break;
 
@@ -1393,7 +1393,7 @@ static ssize_t encode_value(uint8_t *out, size_t outlen,
                break;
 
        case FR_TYPE_UINT32:
-               lvalue = htonl(vp->vp_integer);
+               lvalue = htonl(vp->vp_uint32);
                memcpy(p, &lvalue, 4);
                p += 4;
                break;
@@ -1669,7 +1669,7 @@ int fr_dhcp_encode(RADIUS_PACKET *packet)
 
        /* store xid */
        if ((vp = fr_pair_find_by_num(packet->vps, DHCP_MAGIC_VENDOR, 260, TAG_ANY))) {
-               packet->id = vp->vp_integer;
+               packet->id = vp->vp_uint32;
        } else {
                packet->id = fr_rand();
        }
@@ -1690,8 +1690,8 @@ int fr_dhcp_encode(RADIUS_PACKET *packet)
 
        /* DHCP-DHCP-Maximum-Msg-Size */
        vp = fr_pair_find_by_num(packet->vps, 57, DHCP_MAGIC_VENDOR, TAG_ANY);
-       if (vp && (vp->vp_integer > mms)) {
-               mms = vp->vp_integer;
+       if (vp && (vp->vp_uint32 > mms)) {
+               mms = vp->vp_uint32;
 
                if (mms > MAX_PACKET_SIZE) mms = MAX_PACKET_SIZE;
        }
@@ -1699,28 +1699,28 @@ int fr_dhcp_encode(RADIUS_PACKET *packet)
 
        vp = fr_pair_find_by_num(packet->vps, DHCP_MAGIC_VENDOR, 256, TAG_ANY);
        if (vp) {
-               *p++ = vp->vp_integer & 0xff;
+               *p++ = vp->vp_uint32 & 0xff;
        } else {
                *p++ = 1;       /* client message */
        }
 
        /* DHCP-Hardware-Type */
        if ((vp = fr_pair_find_by_num(packet->vps, DHCP_MAGIC_VENDOR, 257, TAG_ANY))) {
-               *p++ = vp->vp_byte;
+               *p++ = vp->vp_uint8;
        } else {
                *p++ = 1;               /* hardware type = ethernet */
        }
 
        /* DHCP-Hardware-Address-len */
        if ((vp = fr_pair_find_by_num(packet->vps, DHCP_MAGIC_VENDOR, 258, TAG_ANY))) {
-               *p++ = vp->vp_byte;
+               *p++ = vp->vp_uint8;
        } else {
                *p++ = 6;               /* 6 bytes of ethernet */
        }
 
        /* DHCP-Hop-Count */
        if ((vp = fr_pair_find_by_num(packet->vps, DHCP_MAGIC_VENDOR, 259, TAG_ANY))) {
-               *p = vp->vp_byte;
+               *p = vp->vp_uint8;
        }
        p++;
 
index ef9969bd2eea0cb0241bafd2087ad1d01d6d9fb3..be632e1d412a5f30133731c62e1161c1ec56d1fc 100644 (file)
@@ -158,7 +158,7 @@ static RADIUS_PACKET *request_init(char const *filename)
                 *      Allow to set packet type using DHCP-Message-Type
                 */
                if (vp->da->vendor == DHCP_MAGIC_VENDOR && vp->da->attr == PW_DHCP_MESSAGE_TYPE) {
-                       request->code = vp->vp_integer + PW_DHCP_OFFSET;
+                       request->code = vp->vp_uint32 + PW_DHCP_OFFSET;
                } else if (!vp->da->vendor) switch (vp->da->attr) {
                /*
                 *      Allow it to set the packet type in
@@ -166,11 +166,11 @@ static RADIUS_PACKET *request_init(char const *filename)
                 *      (this takes precedence over the command argument.)
                 */
                case PW_PACKET_TYPE:
-                       request->code = vp->vp_integer;
+                       request->code = vp->vp_uint32;
                        break;
 
                case PW_PACKET_DST_PORT:
-                       request->dst_port = (vp->vp_integer & 0xffff);
+                       request->dst_port = (vp->vp_uint32 & 0xffff);
                        break;
 
                case PW_PACKET_DST_IP_ADDRESS:
@@ -179,7 +179,7 @@ static RADIUS_PACKET *request_init(char const *filename)
                        break;
 
                case PW_PACKET_SRC_PORT:
-                       request->src_port = (vp->vp_integer & 0xffff);
+                       request->src_port = (vp->vp_uint32 & 0xffff);
                        break;
 
                case PW_PACKET_SRC_IP_ADDRESS:
index 32cf59b4dcad441b54944558cf22886846193003..a60f97680cf6edab9ef8fa1e63dbcdf0f78e4daa 100644 (file)
@@ -103,16 +103,16 @@ static int dhcprelay_process_client_request(REQUEST *request)
         * Drop requests if hop-count > 16 or admin specified another value
         */
        if ((vp = fr_pair_find_by_num(request->control, DHCP_MAGIC_VENDOR, 271, TAG_ANY))) { /* DHCP-Relay-Max-Hop-Count */
-           maxhops = vp->vp_integer;
+           maxhops = vp->vp_uint32;
        }
        vp = fr_pair_find_by_num(request->packet->vps, DHCP_MAGIC_VENDOR, 259, TAG_ANY); /* DHCP-Hop-Count */
        rad_assert(vp != NULL);
-       if (vp->vp_byte > maxhops) {
+       if (vp->vp_uint8 > maxhops) {
                RDEBUG2("Number of hops is greater than %d: not relaying", maxhops);
                return 1;
        } else {
            /* Increment hop count */
-           vp->vp_byte++;
+           vp->vp_uint8++;
        }
 
        sock = request->listener->data;
@@ -195,7 +195,7 @@ static int dhcprelay_process_server_reply(REQUEST *request)
        if ((request->packet->code == PW_DHCP_NAK) ||
            !sock->src_interface ||
            ((vp = fr_pair_find_by_num(request->packet->vps, DHCP_MAGIC_VENDOR, 262, TAG_ANY)) /* DHCP-Flags */ &&
-            (vp->vp_integer & 0x8000) &&
+            (vp->vp_uint32 & 0x8000) &&
             ((vp = fr_pair_find_by_num(request->packet->vps, DHCP_MAGIC_VENDOR, 263, TAG_ANY)) /* DHCP-Client-IP-Address */ &&
              (vp->vp_ipv4addr == htonl(INADDR_ANY))))) {
                /*
@@ -315,7 +315,7 @@ static rlm_rcode_t dhcp_process(REQUEST *request)
 
        vp = fr_pair_find_by_num(request->packet->vps, DHCP_MAGIC_VENDOR, 53, TAG_ANY); /* DHCP-Message-Type */
        if (vp) {
-               fr_dict_enum_t *dv = fr_dict_enum_by_da(NULL, vp->da, vp->vp_byte);
+               fr_dict_enum_t *dv = fr_dict_enum_by_da(NULL, vp->da, vp->vp_uint8);
 
                if (dv) {
                        CONF_SECTION *server, *unlang;
@@ -327,7 +327,7 @@ static rlm_rcode_t dhcp_process(REQUEST *request)
                        unlang = cf_subsection_find_name2(server, "dhcp", dv->name);
                        rcode = unlang_interpret(request, unlang, RLM_MODULE_NOOP);
                } else {
-                       REDEBUG("Unknown DHCP-Message-Type %d", vp->vp_byte);
+                       REDEBUG("Unknown DHCP-Message-Type %d", vp->vp_uint8);
                        rcode = RLM_MODULE_FAIL;
                }
        } else {
@@ -337,7 +337,7 @@ static rlm_rcode_t dhcp_process(REQUEST *request)
 
        vp = fr_pair_find_by_num(request->reply->vps, DHCP_MAGIC_VENDOR, 53, TAG_ANY); /* DHCP-Message-Type */
        if (vp) {
-               request->reply->code = vp->vp_byte;
+               request->reply->code = vp->vp_uint8;
                if ((request->reply->code != 0) &&
                    (request->reply->code < PW_DHCP_OFFSET)) {
                        request->reply->code += PW_DHCP_OFFSET;
@@ -391,7 +391,7 @@ static rlm_rcode_t dhcp_process(REQUEST *request)
        }
 
        /* BOOTREPLY received on port 67 (i.e. from a server) */
-       if (vp->vp_byte == 2) {
+       if (vp->vp_uint8 == 2) {
                return dhcprelay_process_server_reply(request);
        }
 
@@ -401,7 +401,7 @@ static rlm_rcode_t dhcp_process(REQUEST *request)
        }
 
        /* else it's a packet from a client, without relaying */
-       rad_assert(vp->vp_byte == 1); /* BOOTREQUEST */
+       rad_assert(vp->vp_uint8 == 1); /* BOOTREQUEST */
 
        sock = request->listener->data;
 
@@ -439,7 +439,7 @@ static rlm_rcode_t dhcp_process(REQUEST *request)
 
        vp = fr_pair_find_by_num(request->reply->vps, DHCP_MAGIC_VENDOR, 256, TAG_ANY); /* DHCP-Opcode */
        rad_assert(vp != NULL);
-       vp->vp_byte = 2; /* BOOTREPLY */
+       vp->vp_uint8 = 2; /* BOOTREPLY */
 
        /*
         *      Allow NAKs to be delayed for a short period of time.
@@ -447,8 +447,8 @@ static rlm_rcode_t dhcp_process(REQUEST *request)
        if (request->reply->code == PW_DHCP_NAK) {
                vp = fr_pair_find_by_num(request->reply->vps, 0, PW_FREERADIUS_RESPONSE_DELAY, TAG_ANY);
                if (vp) {
-                       if (vp->vp_integer <= 10) {
-                               request->response_delay.tv_sec = vp->vp_integer;
+                       if (vp->vp_uint32 <= 10) {
+                               request->response_delay.tv_sec = vp->vp_uint32;
                                request->response_delay.tv_usec = 0;
                        } else {
                                request->response_delay.tv_sec = 10;
@@ -458,9 +458,9 @@ static rlm_rcode_t dhcp_process(REQUEST *request)
 #define USEC 1000000
                        vp = fr_pair_find_by_num(request->reply->vps, 0, PW_FREERADIUS_RESPONSE_DELAY_USEC, TAG_ANY);
                        if (vp) {
-                               if (vp->vp_integer <= 10 * USEC) {
-                                       request->response_delay.tv_sec = vp->vp_integer / USEC;
-                                       request->response_delay.tv_usec = vp->vp_integer % USEC;
+                               if (vp->vp_uint32 <= 10 * USEC) {
+                                       request->response_delay.tv_sec = vp->vp_uint32 / USEC;
+                                       request->response_delay.tv_usec = vp->vp_uint32 % USEC;
                                } else {
                                        request->response_delay.tv_sec = 10;
                                        request->response_delay.tv_usec = 0;
@@ -538,7 +538,7 @@ static rlm_rcode_t dhcp_process(REQUEST *request)
                request->reply->dst_port = request->packet->dst_port;
 
                vp = fr_pair_find_by_num(request->reply->vps, 0, PW_PACKET_DST_PORT, TAG_ANY);
-               if (vp) request->reply->dst_port = vp->vp_integer;
+               if (vp) request->reply->dst_port = vp->vp_uint32;
 
                return RLM_MODULE_OK;
        }
@@ -566,7 +566,7 @@ static rlm_rcode_t dhcp_process(REQUEST *request)
         */
        if ((request->reply->code == PW_DHCP_NAK) ||
            ((vp = fr_pair_find_by_num(request->reply->vps, DHCP_MAGIC_VENDOR, 262, TAG_ANY)) && /* DHCP-Flags */
-            (vp->vp_integer & 0x8000) &&
+            (vp->vp_uint32 & 0x8000) &&
             ((vp = fr_pair_find_by_num(request->reply->vps, DHCP_MAGIC_VENDOR, 263, TAG_ANY)) && /* DHCP-Client-IP-Address */
              (vp->vp_ipv4addr == htonl(INADDR_ANY))))) {
                /*
index 7e2f10d8242f3602d6c898df00c98396e1282320..fd580539d70717efdb29fd6055026d878041fa38 100644 (file)
@@ -130,10 +130,10 @@ static void acct_running(REQUEST *request, fr_state_action_t action)
                 */
                vp = fr_pair_find_by_num(request->reply->vps, 0, PW_PACKET_TYPE, TAG_ANY);
                if (vp) {
-                       if (vp->vp_integer == 256) {
+                       if (vp->vp_uint32 == 256) {
                                request->reply->code = 0;
                        } else {
-                               request->reply->code = vp->vp_integer;
+                               request->reply->code = vp->vp_uint32;
                        }
                }
 
index 2e325eb316f29452844cfe8cd10adaee14383796..4ab68366ef432f109853515a55cbf0719c16880f 100644 (file)
@@ -79,7 +79,7 @@ static void auth_message(char const *msg, REQUEST *request, int goodpass)
                        if (auth_type) {
                                snprintf(clean_password, sizeof(clean_password),
                                         "<via Auth-Type = %s>",
-                                        fr_dict_enum_name_by_da(NULL, auth_type->da, auth_type->vp_integer));
+                                        fr_dict_enum_name_by_da(NULL, auth_type->da, auth_type->vp_uint32));
                        } else {
                                strcpy(clean_password, "<no User-Password attribute>");
                        }
@@ -426,7 +426,7 @@ static void auth_running(REQUEST *request, fr_state_action_t action)
                                continue;
                        }
 
-                       RWDEBUG("Ignoring extra Auth-Type = %s", fr_dict_enum_name_by_da(NULL, auth_type->da, vp->vp_integer));
+                       RWDEBUG("Ignoring extra Auth-Type = %s", fr_dict_enum_name_by_da(NULL, auth_type->da, vp->vp_uint32));
                }
 
                /*
@@ -441,13 +441,13 @@ static void auth_running(REQUEST *request, fr_state_action_t action)
                /*
                 *      Handle hard-coded Accept and Reject.
                 */
-               if (auth_type->vp_integer == PW_AUTH_TYPE_ACCEPT) {
+               if (auth_type->vp_uint32 == PW_AUTH_TYPE_ACCEPT) {
                        RDEBUG2("Auth-Type = Accept, allowing user");
                        request->reply->code = PW_CODE_ACCESS_ACCEPT;
                        goto setup_send;
                }
 
-               if (auth_type->vp_integer == PW_AUTH_TYPE_REJECT) {
+               if (auth_type->vp_uint32 == PW_AUTH_TYPE_REJECT) {
                        RDEBUG2("Auth-Type = Reject, rejecting user");
                        request->reply->code = PW_CODE_ACCESS_REJECT;
                        goto setup_send;
@@ -457,9 +457,9 @@ static void auth_running(REQUEST *request, fr_state_action_t action)
                 *      Find the appropriate Auth-Type by name.
                 */
                vp = auth_type;
-               dv = fr_dict_enum_by_da(NULL, vp->da, vp->vp_integer);
+               dv = fr_dict_enum_by_da(NULL, vp->da, vp->vp_uint32);
                if (!dv) {
-                       REDEBUG2("Unknown Auth-Type %d found: rejecting the user.", vp->vp_integer);
+                       REDEBUG2("Unknown Auth-Type %d found: rejecting the user.", vp->vp_uint32);
                        request->reply->code = PW_CODE_ACCESS_REJECT;
                        goto setup_send;
                }
@@ -605,10 +605,10 @@ static void auth_running(REQUEST *request, fr_state_action_t action)
                 */
                vp = fr_pair_find_by_num(request->reply->vps, 0, PW_PACKET_TYPE, TAG_ANY);
                if (vp) {
-                       if (vp->vp_integer == 256) {
+                       if (vp->vp_uint32 == 256) {
                                request->reply->code = 0;
                        } else {
-                               request->reply->code = vp->vp_integer;
+                               request->reply->code = vp->vp_uint32;
                        }
                }
 
@@ -719,10 +719,10 @@ static void auth_running(REQUEST *request, fr_state_action_t action)
                if (!request->reply->code) {
                        vp = fr_pair_find_by_num(request->control, 0, PW_AUTH_TYPE, TAG_ANY);
                        if (vp) {
-                               if (vp->vp_integer == PW_AUTH_TYPE_ACCEPT) {
+                               if (vp->vp_uint32 == PW_AUTH_TYPE_ACCEPT) {
                                        request->reply->code = PW_CODE_ACCESS_ACCEPT;
 
-                               } else if (vp->vp_integer == PW_AUTH_TYPE_REJECT) {
+                               } else if (vp->vp_uint32 == PW_AUTH_TYPE_REJECT) {
                                        request->reply->code = PW_CODE_ACCESS_REJECT;
                                }
                        }
@@ -805,8 +805,8 @@ static void auth_running(REQUEST *request, fr_state_action_t action)
 
                        vp = fr_pair_find_by_num(request->reply->vps, 0, PW_FREERADIUS_RESPONSE_DELAY, TAG_ANY);
                        if (vp) {
-                               if (vp->vp_integer <= 10) {
-                                       delay.tv_sec = vp->vp_integer;
+                               if (vp->vp_uint32 <= 10) {
+                                       delay.tv_sec = vp->vp_uint32;
                                } else {
                                        delay.tv_sec = 10;
                                }
@@ -814,9 +814,9 @@ static void auth_running(REQUEST *request, fr_state_action_t action)
                        } else {
                                vp = fr_pair_find_by_num(request->reply->vps, 0, PW_FREERADIUS_RESPONSE_DELAY_USEC, TAG_ANY);
                                if (vp) {
-                                       if (vp->vp_integer <= 10 * USEC) {
-                                               delay.tv_sec = vp->vp_integer / USEC;
-                                               delay.tv_usec = vp->vp_integer % USEC;
+                                       if (vp->vp_uint32 <= 10 * USEC) {
+                                               delay.tv_sec = vp->vp_uint32 / USEC;
+                                               delay.tv_usec = vp->vp_uint32 % USEC;
                                        } else {
                                                delay.tv_sec = 10;
                                                delay.tv_usec = 0;
index ec2c86e701f6b91b2b1bd18e3e4830e6ba1986e4..6abeeb54524cf03f6a7c4f1343f9c743d47677fc 100644 (file)
@@ -125,10 +125,10 @@ static void coa_running(REQUEST *request, fr_state_action_t action)
                 */
                vp = fr_pair_find_by_num(request->reply->vps, 0, PW_PACKET_TYPE, TAG_ANY);
                if (vp) {
-                       if (vp->vp_integer == 256) {
+                       if (vp->vp_uint32 == 256) {
                                request->reply->code = 0;
                        } else {
-                               request->reply->code = vp->vp_integer;
+                               request->reply->code = vp->vp_uint32;
                        }
                }
 
index e9b37d713d8c49ecff29f61e1d1189d81d7d1a10..018fb71a93779c858876dd37640086b962104a4c 100644 (file)
@@ -131,7 +131,7 @@ static void state_add(REQUEST *request, RADIUS_PACKET *packet)
        uint32_t session_id;
        uint8_t buf[16] = {0};  /* FIXME state.c:sizeof(struct state_comp) */
 
-       rad_assert(sizeof(request->listener) + sizeof(vp->vp_integer) <= sizeof(buf));
+       rad_assert(sizeof(request->listener) + sizeof(vp->vp_uint32) <= sizeof(buf));
 
        /* session_id is per TCP connection */
        memcpy(&buf[0], &request->listener, sizeof(request->listener));
@@ -246,7 +246,7 @@ stop_processing:
                                continue;
                        }
 
-                       RWDEBUG("Ignoring extra Auth-Type = %s", fr_dict_enum_name_by_da(NULL, auth_type->da, vp->vp_integer));
+                       RWDEBUG("Ignoring extra Auth-Type = %s", fr_dict_enum_name_by_da(NULL, auth_type->da, vp->vp_uint32));
                }
 
                /*
@@ -261,13 +261,13 @@ stop_processing:
                /*
                 *      Handle hard-coded Accept and Reject.
                 */
-               if (auth_type->vp_integer == PW_AUTH_TYPE_ACCEPT) {
+               if (auth_type->vp_uint32 == PW_AUTH_TYPE_ACCEPT) {
                        RDEBUG2("Auth-Type = Accept, allowing user");
                        tacacs_status(request, RLM_MODULE_OK);
                        goto setup_send;
                }
 
-               if (auth_type->vp_integer == PW_AUTH_TYPE_REJECT) {
+               if (auth_type->vp_uint32 == PW_AUTH_TYPE_REJECT) {
                        RDEBUG2("Auth-Type = Reject, rejecting user");
                        tacacs_status(request, RLM_MODULE_REJECT);
                        goto setup_send;
@@ -277,9 +277,9 @@ stop_processing:
                 *      Find the appropriate Auth-Type by name.
                 */
                vp = auth_type;
-               dv = fr_dict_enum_by_da(NULL, vp->da, vp->vp_integer);
+               dv = fr_dict_enum_by_da(NULL, vp->da, vp->vp_uint32);
                if (!dv) {
-                       REDEBUG2("Unknown Auth-Type %d found: rejecting the user.", vp->vp_integer);
+                       REDEBUG2("Unknown Auth-Type %d found: rejecting the user.", vp->vp_uint32);
                        tacacs_status(request, RLM_MODULE_FAIL);
                        goto setup_send;
                }
@@ -367,7 +367,7 @@ send_reply:
                        vp = fr_pair_find_by_da(request->reply->vps, authda, TAG_ANY);
 
                        if (vp) {
-                               switch ((tacacs_authen_reply_status_t)vp->vp_byte) {
+                               switch ((tacacs_authen_reply_status_t)vp->vp_uint8) {
                                case TAC_PLUS_AUTHEN_STATUS_PASS:
                                case TAC_PLUS_AUTHEN_STATUS_FAIL:
                                case TAC_PLUS_AUTHEN_STATUS_RESTART:
@@ -382,14 +382,14 @@ send_reply:
                                        rad_assert(vp != NULL);
 
                                        /* authentication would continue but seq_no cannot continue */
-                                       if (vp->vp_byte == 253) {
+                                       if (vp->vp_uint8 == 253) {
                                                RWARN("Sequence number would wrap, restarting authentication");
                                                fr_state_discard(global_state, request, request->packet);
                                                fr_pair_list_free(&request->reply->vps);
 
                                                vp = fr_pair_afrom_da(request->reply, authda);
                                                rad_assert(vp != NULL);
-                                               vp->vp_byte = (tacacs_authen_reply_status_t)TAC_PLUS_AUTHEN_STATUS_RESTART;
+                                               vp->vp_uint8 = (tacacs_authen_reply_status_t)TAC_PLUS_AUTHEN_STATUS_RESTART;
                                                fr_pair_add(&request->reply->vps, vp);
                                        } else {
                                                state_add(request, request->reply);
index 11016d5dee1a45250a0b697dbea10e1543e518d6..ba64e978c9607c1b9ffa7bc7dcd061e0612ee823 100644 (file)
@@ -40,7 +40,7 @@ tacacs_type_t tacacs_type(RADIUS_PACKET const * const packet)
        vp = fr_pair_find_by_child_num(packet->vps, dict_tacacs_root, PW_TACACS_PACKET_TYPE, TAG_ANY);
        rad_assert(vp != NULL);
 
-       return (tacacs_type_t)vp->vp_byte;
+       return (tacacs_type_t)vp->vp_uint8;
 }
 
 char const * tacacs_lookup_packet_code(RADIUS_PACKET const * const packet)
@@ -66,7 +66,7 @@ uint32_t tacacs_session_id(RADIUS_PACKET const * const packet)
        vp = fr_pair_find_by_child_num(packet->vps, dict_tacacs_root, PW_TACACS_SESSION_ID, TAG_ANY);
        rad_assert(vp != NULL);
 
-       return vp->vp_integer;
+       return vp->vp_uint32;
 }
 
 static bool tacacs_ok(RADIUS_PACKET const * const packet, bool from_client)
@@ -273,31 +273,31 @@ int tacacs_encode(RADIUS_PACKET * const packet, char const * const secret)
 
                switch (vp->da->attr) {
                case PW_TACACS_VERSION_MINOR:
-                       pkt->hdr.ver.minor = vp->vp_byte;
+                       pkt->hdr.ver.minor = vp->vp_uint8;
                        break;
                case PW_TACACS_PACKET_TYPE:
-                       pkt->hdr.type = vp->vp_byte;
+                       pkt->hdr.type = vp->vp_uint8;
                        break;
                case PW_TACACS_SEQUENCE_NUMBER:
-                       pkt->hdr.seq_no = vp->vp_byte;
+                       pkt->hdr.seq_no = vp->vp_uint8;
                        break;
                case PW_TACACS_SESSION_ID:
-                       pkt->hdr.session_id = htonl(vp->vp_integer);
+                       pkt->hdr.session_id = htonl(vp->vp_uint32);
                        break;
                case PW_TACACS_AUTHENTICATION_STATUS:
-                       pkt->authen.reply.status = vp->vp_byte;
-                       status = vp->vp_byte;
+                       pkt->authen.reply.status = vp->vp_uint8;
+                       status = vp->vp_uint8;
                        break;
                case PW_TACACS_AUTHENTICATION_FLAGS:
-                       authen_reply_flags |= vp->vp_byte;
+                       authen_reply_flags |= vp->vp_uint8;
                        break;
                case PW_TACACS_AUTHORIZATION_STATUS:
-                       pkt->author.res.status = vp->vp_byte;
-                       status = vp->vp_byte;
+                       pkt->author.res.status = vp->vp_uint8;
+                       status = vp->vp_uint8;
                        break;
                case PW_TACACS_ACCOUNTING_STATUS:
-                       pkt->acct.res.status = vp->vp_byte;
-                       status = vp->vp_byte;
+                       pkt->acct.res.status = vp->vp_uint8;
+                       status = vp->vp_uint8;
                        break;
                case PW_TACACS_SERVER_MESSAGE:
                        length_body += vp->vp_length;
@@ -422,26 +422,26 @@ int tacacs_decode(RADIUS_PACKET * const packet)
 
        vp = fr_pair_afrom_child_num(packet, dict_tacacs_root, PW_TACACS_VERSION_MINOR);
        if (!vp) return -1;
-       vp->vp_byte = pkt->hdr.ver.minor;
+       vp->vp_uint8 = pkt->hdr.ver.minor;
        fr_pair_cursor_append(&cursor, vp);
 
        vp = fr_pair_afrom_child_num(packet, dict_tacacs_root, PW_TACACS_PACKET_TYPE);
        if (!vp) return -1;
-       vp->vp_byte = pkt->hdr.type;
+       vp->vp_uint8 = pkt->hdr.type;
        fr_pair_cursor_append(&cursor, vp);
 
        packet->code = pkt->hdr.type;
 
        vp = fr_pair_afrom_child_num(packet, dict_tacacs_root, PW_TACACS_SEQUENCE_NUMBER);
        if (!vp) return -1;
-       vp->vp_byte = pkt->hdr.seq_no;
+       vp->vp_uint8 = pkt->hdr.seq_no;
        fr_pair_cursor_append(&cursor, vp);
 
        vp = fr_pair_afrom_child_num(packet, dict_tacacs_root, PW_TACACS_SESSION_ID);
        if (!vp) return -1;
-       vp->vp_integer = ntohl(pkt->hdr.session_id);
+       vp->vp_uint32 = ntohl(pkt->hdr.session_id);
        fr_pair_cursor_append(&cursor, vp);
-       session_id = vp->vp_integer;
+       session_id = vp->vp_uint32;
 
        switch ((tacacs_type_t)pkt->hdr.type) {
        case TAC_PLUS_AUTHEN:
@@ -451,22 +451,22 @@ int tacacs_decode(RADIUS_PACKET * const packet)
 
                        vp = fr_pair_afrom_child_num(packet, dict_tacacs_root, PW_TACACS_ACTION);
                        if (!vp) return -1;
-                       vp->vp_byte = pkt->authen.start.action;
+                       vp->vp_uint8 = pkt->authen.start.action;
                        fr_pair_cursor_append(&cursor, vp);
 
                        vp = fr_pair_afrom_child_num(packet, dict_tacacs_root, PW_TACACS_PRIVILEGE_LEVEL);
                        if (!vp) return -1;
-                       vp->vp_byte = pkt->authen.start.priv_lvl;
+                       vp->vp_uint8 = pkt->authen.start.priv_lvl;
                        fr_pair_cursor_append(&cursor, vp);
 
                        vp = fr_pair_afrom_child_num(packet, dict_tacacs_root, PW_TACACS_AUTHENTICATION_TYPE);
                        if (!vp) return -1;
-                       vp->vp_byte = pkt->authen.start.authen_type;
+                       vp->vp_uint8 = pkt->authen.start.authen_type;
                        fr_pair_cursor_append(&cursor, vp);
 
                        vp = fr_pair_afrom_child_num(packet, dict_tacacs_root, PW_TACACS_AUTHENTICATION_SERVICE);
                        if (!vp) return -1;
-                       vp->vp_byte = pkt->authen.start.authen_service;
+                       vp->vp_uint8 = pkt->authen.start.authen_service;
                        fr_pair_cursor_append(&cursor, vp);
 
                        if (pkt->authen.start.user_len) {
@@ -533,22 +533,22 @@ int tacacs_decode(RADIUS_PACKET * const packet)
 
                vp = fr_pair_afrom_child_num(packet, dict_tacacs_root, PW_TACACS_AUTHENTICATION_METHOD);
                if (!vp) return -1;
-               vp->vp_byte = pkt->author.req.authen_method;
+               vp->vp_uint8 = pkt->author.req.authen_method;
                fr_pair_cursor_append(&cursor, vp);
 
                vp = fr_pair_afrom_child_num(packet, dict_tacacs_root, PW_TACACS_PRIVILEGE_LEVEL);
                if (!vp) return -1;
-               vp->vp_byte = pkt->author.req.priv_lvl;
+               vp->vp_uint8 = pkt->author.req.priv_lvl;
                fr_pair_cursor_append(&cursor, vp);
 
                vp = fr_pair_afrom_child_num(packet, dict_tacacs_root, PW_TACACS_AUTHENTICATION_TYPE);
                if (!vp) return -1;
-               vp->vp_byte = pkt->author.req.authen_type;
+               vp->vp_uint8 = pkt->author.req.authen_type;
                fr_pair_cursor_append(&cursor, vp);
 
                vp = fr_pair_afrom_child_num(packet, dict_tacacs_root, PW_TACACS_AUTHENTICATION_SERVICE);
                if (!vp) return -1;
-               vp->vp_byte = pkt->author.req.authen_service;
+               vp->vp_uint8 = pkt->author.req.authen_service;
                fr_pair_cursor_append(&cursor, vp);
 
                if (pkt->author.req.user_len) {
@@ -584,40 +584,40 @@ int tacacs_decode(RADIUS_PACKET * const packet)
                if (pkt->acct.req.flags & TAC_PLUS_ACCT_FLAG_START) {
                        vp = fr_pair_afrom_child_num(packet, dict_tacacs_root, PW_TACACS_ACCOUNTING_FLAGS);
                        if (!vp) return -1;
-                       vp->vp_byte = TAC_PLUS_ACCT_FLAG_START;
+                       vp->vp_uint8 = TAC_PLUS_ACCT_FLAG_START;
                        fr_pair_cursor_append(&cursor, vp);
                }
                if (pkt->acct.req.flags & TAC_PLUS_ACCT_FLAG_STOP) {
                        vp = fr_pair_afrom_child_num(packet, dict_tacacs_root, PW_TACACS_ACCOUNTING_FLAGS);
                        if (!vp) return -1;
-                       vp->vp_byte = TAC_PLUS_ACCT_FLAG_STOP;
+                       vp->vp_uint8 = TAC_PLUS_ACCT_FLAG_STOP;
                        fr_pair_cursor_append(&cursor, vp);
                }
                if (pkt->acct.req.flags & TAC_PLUS_ACCT_FLAG_WATCHDOG) {
                        vp = fr_pair_afrom_child_num(packet, dict_tacacs_root, PW_TACACS_ACCOUNTING_FLAGS);
                        if (!vp) return -1;
-                       vp->vp_byte = TAC_PLUS_ACCT_FLAG_WATCHDOG;
+                       vp->vp_uint8 = TAC_PLUS_ACCT_FLAG_WATCHDOG;
                        fr_pair_cursor_append(&cursor, vp);
                }
 
                vp = fr_pair_afrom_child_num(packet, dict_tacacs_root, PW_TACACS_AUTHENTICATION_METHOD);
                if (!vp) return -1;
-               vp->vp_byte = pkt->acct.req.authen_method;
+               vp->vp_uint8 = pkt->acct.req.authen_method;
                fr_pair_cursor_append(&cursor, vp);
 
                vp = fr_pair_afrom_child_num(packet, dict_tacacs_root, PW_TACACS_PRIVILEGE_LEVEL);
                if (!vp) return -1;
-               vp->vp_byte = pkt->acct.req.priv_lvl;
+               vp->vp_uint8 = pkt->acct.req.priv_lvl;
                fr_pair_cursor_append(&cursor, vp);
 
                vp = fr_pair_afrom_child_num(packet, dict_tacacs_root, PW_TACACS_AUTHENTICATION_TYPE);
                if (!vp) return -1;
-               vp->vp_byte = pkt->acct.req.authen_type;
+               vp->vp_uint8 = pkt->acct.req.authen_type;
                fr_pair_cursor_append(&cursor, vp);
 
                vp = fr_pair_afrom_child_num(packet, dict_tacacs_root, PW_TACACS_AUTHENTICATION_SERVICE);
                if (!vp) return -1;
-               vp->vp_byte = pkt->acct.req.authen_service;
+               vp->vp_uint8 = pkt->acct.req.authen_service;
                fr_pair_cursor_append(&cursor, vp);
 
                if (pkt->acct.req.user_len) {
@@ -800,31 +800,31 @@ int tacacs_send(RADIUS_PACKET * const packet, RADIUS_PACKET const * const origin
 
        vp = fr_pair_find_by_child_num(original->vps, dict_tacacs_root, PW_TACACS_VERSION_MINOR, TAG_ANY);
        rad_assert(vp != NULL);
-       vminor = vp->vp_byte;
+       vminor = vp->vp_uint8;
 
        vp = fr_pair_afrom_da(packet, vp->da);
        if (!vp) return -1;
-       vp->vp_byte = vminor;
+       vp->vp_uint8 = vminor;
        fr_pair_add(&packet->vps, vp);
 
        type = tacacs_type(original);
 
        vp = fr_pair_afrom_child_num(packet, dict_tacacs_root, PW_TACACS_PACKET_TYPE);
-       vp->vp_byte = type;
+       vp->vp_uint8 = type;
        fr_pair_add(&packet->vps, vp);
 
        vp = fr_pair_find_by_child_num(original->vps, dict_tacacs_root, PW_TACACS_SEQUENCE_NUMBER, TAG_ANY);
        rad_assert(vp != NULL);
-       seq_no = vp->vp_byte + 1;       /* we catch client 255 on ingress */
+       seq_no = vp->vp_uint8 + 1;      /* we catch client 255 on ingress */
 
        vp = fr_pair_afrom_da(packet, vp->da);
        if (!vp) return -1;     
-       vp->vp_byte = seq_no;
+       vp->vp_uint8 = seq_no;
        fr_pair_add(&packet->vps, vp);
 
        vp = fr_pair_afrom_child_num(packet, dict_tacacs_root, PW_TACACS_SESSION_ID);
        if (!vp) return -1;
-       vp->vp_integer = tacacs_session_id(original);
+       vp->vp_uint32 = tacacs_session_id(original);
        fr_pair_add(&packet->vps, vp);
 
        if (tacacs_encode(packet, secret) < 0) {
index 5511183131db804da0d4b0fc70961b5f5d149a5f..441114c7e1a8b82703be45828b1fc52296881d0a 100644 (file)
@@ -61,7 +61,7 @@ static void vmps_running(REQUEST *request, fr_state_action_t action)
                        goto done;
                }
 
-               dv = fr_dict_enum_by_da(NULL, vp->da, vp->vp_integer);
+               dv = fr_dict_enum_by_da(NULL, vp->da, vp->vp_uint32);
                if (!dv) {
                        REDEBUG("Failed to find value for &request:VMPS-Packet-Type");
                        goto done;
@@ -83,10 +83,10 @@ static void vmps_running(REQUEST *request, fr_state_action_t action)
                if (vp) {
                        da = vp->da;
 
-                       if (vp->vp_integer == 256) {
+                       if (vp->vp_uint32 == 256) {
                                request->reply->code = 0;
                        } else {
-                               request->reply->code = vp->vp_integer;
+                               request->reply->code = vp->vp_uint32;
                        }
 
                } else if (rcode != RLM_MODULE_HANDLED) {
index 2bac44e7acd7363b51a98ab9d717410fd7ea6c71..aa0086dfb3c108d2ba0bee16b48731d97aab3cfe 100644 (file)
@@ -269,7 +269,7 @@ int vqp_decode(RADIUS_PACKET *packet)
                fr_strerror_printf("No memory");
                return -1;
        }
-       vp->vp_integer = packet->data[1];
+       vp->vp_uint32 = packet->data[1];
        vp->vp_tainted = true;
        debug_pair(vp);
        fr_pair_cursor_append(&cursor, vp);
@@ -279,7 +279,7 @@ int vqp_decode(RADIUS_PACKET *packet)
                fr_strerror_printf("No memory");
                return -1;
        }
-       vp->vp_integer = packet->data[2];
+       vp->vp_uint32 = packet->data[2];
        vp->vp_tainted = true;
        debug_pair(vp);
        fr_pair_cursor_append(&cursor, vp);
@@ -289,7 +289,7 @@ int vqp_decode(RADIUS_PACKET *packet)
                fr_strerror_printf("No memory");
                return -1;
        }
-       vp->vp_integer = packet->id; /* already set by vqp_recv */
+       vp->vp_uint32 = packet->id; /* already set by vqp_recv */
        vp->vp_tainted = true;
        debug_pair(vp);
        fr_pair_cursor_append(&cursor, vp);
@@ -404,7 +404,7 @@ int vqp_encode(RADIUS_PACKET *packet, RADIUS_PACKET *original)
                        return -1;
                }
 
-               code = vp->vp_integer;
+               code = vp->vp_uint32;
                if ((code < 1) || (code > 4)) {
                        fr_strerror_printf("Invalid value %d for VQP-Packet-Type", code);
                        return -1;
@@ -427,7 +427,7 @@ int vqp_encode(RADIUS_PACKET *packet, RADIUS_PACKET *original)
                out[0] = VQP_VERSION;
                out[1] = code;
 
-               out[2] = vp->vp_integer & 0xff;
+               out[2] = vp->vp_uint32 & 0xff;
                return 0;
        }
 
index 997b72fc749ec5e786e20520018d4f15bed0bfad..e7e4839a33d9875a0e4c110441fd333c6b82c4c2 100644 (file)
@@ -201,12 +201,12 @@ static rlm_rcode_t CC_HINT(nonnull(1,2)) attr_filter_common(void const *instance
                     check_item = fr_pair_cursor_next(&check)) {
                        if (!check_item->da->vendor &&
                            (check_item->da->attr == PW_FALL_THROUGH) &&
-                               (check_item->vp_integer == 1)) {
+                               (check_item->vp_uint32 == 1)) {
                                fall_through = 1;
                                continue;
                        }
                        else if (!check_item->da->vendor && check_item->da->attr == PW_RELAX_FILTER) {
-                               relax_filter = check_item->vp_integer;
+                               relax_filter = check_item->vp_uint32;
                                continue;
                        }
 
index 22b1a546df3ecfc6e59948e19fb6a6df50f4e209..904596ac179b2cb261d4f4781ba6ff72eebe8a20 100644 (file)
@@ -163,7 +163,7 @@ static rlm_rcode_t cache_merge(rlm_cache_t const *inst, REQUEST *request, rlm_ca
                        rad_assert(vp != NULL);
                        fr_pair_add(&request->packet->vps, vp);
                }
-               vp->vp_integer = c->hits;
+               vp->vp_uint32 = c->hits;
        }
 
        return merged > 0 ?
@@ -434,7 +434,7 @@ static rlm_rcode_t cache_insert(rlm_cache_t const *inst, REQUEST *request, rlm_c
         *      Check to see if we need to merge the entry into the request
         */
        vp = fr_pair_find_by_num(request->control, 0, PW_CACHE_MERGE_NEW, TAG_ANY);
-       if (vp && (vp->vp_integer > 0)) merge = true;
+       if (vp && (vp->vp_uint32 > 0)) merge = true;
 
        if (merge) cache_merge(inst, request, c);
 
@@ -572,7 +572,7 @@ static rlm_rcode_t mod_cache_it(void *instance, UNUSED void *thread, REQUEST *re
         *      valid cache entry
         */
        vp = fr_pair_find_by_num(request->control, 0, PW_CACHE_STATUS_ONLY, TAG_ANY);
-       if (vp && vp->vp_integer) {
+       if (vp && vp->vp_uint32) {
                RINDENT();
                RDEBUG3("status-only: yes");
                REXDENT();
@@ -592,10 +592,10 @@ static rlm_rcode_t mod_cache_it(void *instance, UNUSED void *thread, REQUEST *re
         *      Figure out what operation we're doing
         */
        vp = fr_pair_find_by_num(request->control, 0, PW_CACHE_ALLOW_MERGE, TAG_ANY);
-       if (vp) merge = (bool)vp->vp_integer;
+       if (vp) merge = (bool)vp->vp_uint32;
 
        vp = fr_pair_find_by_num(request->control, 0, PW_CACHE_ALLOW_INSERT, TAG_ANY);
-       if (vp) insert = (bool)vp->vp_integer;
+       if (vp) insert = (bool)vp->vp_uint32;
 
        vp = fr_pair_find_by_num(request->control, 0, PW_CACHE_TTL, TAG_ANY);
        if (vp) {
index 290fca50fe91cc7350a7e61aee2ffbe36534d2d9..de7ea442b6761988d9c0a30843cd14e6e80cb115 100644 (file)
@@ -390,7 +390,7 @@ json_object *mod_value_pair_to_json_object(REQUEST *request, VALUE_PAIR *vp)
 
                switch (vp->vp_type) {
                case FR_TYPE_UINT32:
-                       i = vp->vp_integer;
+                       i = vp->vp_uint32;
                        goto print_int;
 
                case FR_TYPE_UINT16:
@@ -398,7 +398,7 @@ json_object *mod_value_pair_to_json_object(REQUEST *request, VALUE_PAIR *vp)
                        goto print_int;
 
                case FR_TYPE_UINT8:
-                       i = vp->vp_byte;
+                       i = vp->vp_uint8;
 
                print_int:
                        /* skip if we have flags */
@@ -513,7 +513,7 @@ int mod_ensure_start_timestamp(json_object *json, VALUE_PAIR *vps)
        /* get elapsed session time */
        if ((vp = fr_pair_find_by_num(vps, 0, PW_ACCT_SESSION_TIME, TAG_ANY)) != NULL) {
                /* calculate diff */
-               ts = (ts - vp->vp_integer);
+               ts = (ts - vp->vp_uint32);
                /* calculate start time */
                size_t length = strftime(value, sizeof(value), "%b %e %Y %H:%M:%S %Z", localtime_r(&ts, &tm));
                /* check length */
index f2fa4fbf6130ce5a6a80779b5d8fc0785b550263..dff4506314bd02d11bffbcb8e7fa18783a229a4e 100644 (file)
@@ -197,7 +197,7 @@ static rlm_rcode_t mod_accounting(void *instance, UNUSED void *thread, REQUEST *
        }
 
        /* set status */
-       status = vp->vp_integer;
+       status = vp->vp_uint32;
 
        /* acknowledge the request but take no action */
        if (status == PW_STATUS_ACCOUNTING_ON || status == PW_STATUS_ACCOUNTING_OFF) {
index c328530677a15d7a1c1a059679700fcac16192ef..50c32b24b4b4b5c1ff905de660b4373a146c8f8a 100644 (file)
@@ -152,7 +152,7 @@ static rlm_rcode_t CC_HINT(nonnull) mod_authenticate(UNUSED void *instance, UNUS
                return RLM_MODULE_INVALID;
        }
 
-       switch (authtype->vp_integer){
+       switch (authtype->vp_uint32){
                case 2:                         /*      CRAM-MD5        */
                        if (challenge->vp_length < 5 || response->vp_length != 16) {
                                REDEBUG("Invalid MD5 challenge/response length");
index 7960c0f53109b171ef6b2949d256be247fac4932..1d8cf1fb09ba210c5863634ac733f7e0f224b918 100644 (file)
@@ -65,7 +65,7 @@ static ssize_t xlat_date_convert(UNUSED TALLOC_CTX *ctx, char **out, size_t outl
 
        case FR_TYPE_UINT32:
        case FR_TYPE_UINT64:
-               date = (time_t) vp->vp_integer;
+               date = (time_t) vp->vp_uint32;
 
        encode:
                if (localtime_r(&date, &tminfo) == NULL) {
index 3b53d2640a159c2ed612a64b7dbb9bc3cce46201..1bd4f1089f39407f06d2dd5efbb5f67f04a7a3c3 100644 (file)
@@ -288,9 +288,9 @@ static int detail_write(FILE *out, rlm_detail_t const *inst, REQUEST *request, R
                detail_fr_pair_fprint(request, out, &dst_vp);
 
                src_vp.da = fr_dict_attr_by_num(NULL, 0, PW_PACKET_SRC_PORT);
-               src_vp.vp_integer = packet->src_port;
+               src_vp.vp_uint32 = packet->src_port;
                dst_vp.da = fr_dict_attr_by_num(NULL, 0, PW_PACKET_DST_PORT);
-               dst_vp.vp_integer = packet->dst_port;
+               dst_vp.vp_uint32 = packet->dst_port;
 
                detail_fr_pair_fprint(request, out, &src_vp);
                detail_fr_pair_fprint(request, out, &dst_vp);
index ccc3bdd4c2d5020ea7f4e778e5623f4ea2375eb6..b9f1cb6af10a1802eb568676db5513f8513e5f94 100644 (file)
@@ -245,7 +245,7 @@ int eap_start(rlm_eap_t const *inst, REQUEST *request)
         *      this allows you to NOT do EAP for some users.
         */
        vp = fr_pair_find_by_num(request->packet->vps, 0, PW_EAP_TYPE, TAG_ANY);
-       if (vp && vp->vp_integer == 0) {
+       if (vp && vp->vp_uint32 == 0) {
                RDEBUG2("Found EAP-Message, but EAP-Type = None, so we're not doing EAP");
                return RLM_MODULE_NOOP;
        }
@@ -347,7 +347,7 @@ int eap_start(rlm_eap_t const *inst, REQUEST *request)
         */
        vp = fr_pair_afrom_num(request->packet, 0, PW_EAP_TYPE);
        if (vp) {
-               vp->vp_integer = eap_msg->vp_octets[4];
+               vp->vp_uint32 = eap_msg->vp_octets[4];
                fr_pair_add(&(request->packet->vps), vp);
        }
 
index 69f8abcc953a8910fbe08fc21e8d54509fb641b4..12c9c63e96108623ad98dc426a3cd80d111f0585 100644 (file)
@@ -64,7 +64,7 @@ static bool chbind_build_response(REQUEST *request, CHBIND_REQ *chbind)
         */
        vp = fr_pair_find_by_num(request->control, 0, PW_CHBIND_RESPONSE_CODE, TAG_ANY);
        if (vp) {
-               ptr[0] = vp->vp_integer;
+               ptr[0] = vp->vp_uint32;
        } else {
                ptr[0] = CHBIND_CODE_FAILURE;
        }
index 0887560704408725b333b4717ca072d0dc409ac4..0b53f1b5fd192a33ca7f997b3a9ad14dc7a29481 100644 (file)
@@ -726,7 +726,7 @@ int fr_sim_decode(REQUEST *request, vp_cursor_t *decoded, fr_dict_attr_t const *
                        fr_strerror_printf("Failed allocating subtype attribute");
                        goto error;
                }
-               vp->vp_integer = data[0];
+               vp->vp_uint32 = data[0];
                fr_pair_cursor_append(decoded, vp);
        }
 
@@ -762,10 +762,10 @@ ssize_t fr_sim_encode(REQUEST *request, fr_dict_attr_t const *parent, uint8_t ty
        subtype = vp->vp_short;
 
        vp = fr_pair_find_by_num(to_encode, 0, PW_EAP_ID, TAG_ANY);
-       id = vp ? vp->vp_integer : ((int)getpid() & 0xff);
+       id = vp ? vp->vp_uint32 : ((int)getpid() & 0xff);
 
        vp = fr_pair_find_by_num(to_encode, 0, PW_EAP_CODE, TAG_ANY);
-       eap_code = vp ? vp->vp_integer : PW_EAP_REQUEST;
+       eap_code = vp ? vp->vp_uint32 : PW_EAP_REQUEST;
 
        /*
         *      Fill in some bits in the EAP packet
index ba2c90062896faa232f91353c348e0442c3b7852..0fc888321edd992b1f8c6532c75ea76b2459d161 100644 (file)
@@ -63,7 +63,7 @@ static int vector_gsm_from_ki(eap_session_t *eap_session, VALUE_PAIR *vps,
                keys->gsm.vector[idx].rand[i] = fr_rand();
        }
 
-       switch (version->vp_integer) {
+       switch (version->vp_uint32) {
        case 1:
                comp128v1(keys->gsm.vector[idx].sres,
                          keys->gsm.vector[idx].kc, vp->vp_octets,
@@ -89,7 +89,7 @@ static int vector_gsm_from_ki(eap_session_t *eap_session, VALUE_PAIR *vps,
                return 1;
 
        default:
-               REDEBUG("Unknown/unsupported algorithm Comp128-%i", version->vp_integer);
+               REDEBUG("Unknown/unsupported algorithm Comp128-%i", version->vp_uint32);
                return -1;
        }
        return 0;
@@ -363,7 +363,7 @@ static int vector_umts_from_ki(eap_session_t *eap_session, VALUE_PAIR *vps,
                keys->umts.vector.rand[i] = fr_rand();
        }
 
-       switch (version->vp_integer) {
+       switch (version->vp_uint32) {
        case 1:
                comp128v1(keys->umts.vector.sres,
                          keys->umts.vector.kc, vp->vp_octets,
@@ -389,7 +389,7 @@ static int vector_umts_from_ki(eap_session_t *eap_session, VALUE_PAIR *vps,
                return 1;
 
        default:
-               REDEBUG("Unknown/unsupported algorithm Comp128-%i", version->vp_integer);
+               REDEBUG("Unknown/unsupported algorithm Comp128-%i", version->vp_uint32);
                return -1;
        }
        return 0;
index c17deee472b09a355bf7d8351176531d42a8a2a5..0439494d84a3c2a8bc4ac0c31ca8a2b75ff6b6bc 100644 (file)
@@ -314,10 +314,10 @@ static eap_type_t eap_process_nak(rlm_eap_t *inst, REQUEST *request,
                 *      Enforce per-user configuration of EAP
                 *      types.
                 */
-               if (vp && (vp->vp_integer != nak->data[i])) {
+               if (vp && (vp->vp_uint32 != nak->data[i])) {
                        RDEBUG2("Peer wants %s (%d), while we require %s (%d), skipping",
                                eap_type2name(nak->data[i]), nak->data[i],
-                               eap_type2name(vp->vp_integer), vp->vp_integer);
+                               eap_type2name(vp->vp_uint32), vp->vp_uint32);
 
                        continue;
                }
@@ -404,7 +404,7 @@ static rlm_rcode_t eap_method_select(rlm_eap_t *inst, eap_session_t *eap_session
                vp = fr_pair_find_by_num(eap_session->request->control, 0, PW_EAP_TYPE, TAG_ANY);
                if (vp) {
                        RDEBUG2("Setting method from &control:EAP-Type");
-                       next = vp->vp_integer;
+                       next = vp->vp_uint32;
                }
 
                /*
@@ -661,7 +661,7 @@ static rlm_rcode_t mod_authorize(void *instance, UNUSED void *thread, REQUEST *r
         *      and to get excited if it doesn't appear.
         */
        vp = fr_pair_find_by_num(request->control, 0, PW_AUTH_TYPE, TAG_ANY);
-       if ((!vp) || (vp->vp_integer != PW_AUTH_TYPE_REJECT)) {
+       if ((!vp) || (vp->vp_uint32 != PW_AUTH_TYPE_REJECT)) {
                vp = pair_make_config("Auth-Type", inst->name, T_OP_EQ);
                if (!vp) {
                        RDEBUG2("Failed to create Auth-Type %s: %s\n",
@@ -874,7 +874,7 @@ static rlm_rcode_t mod_post_auth(void *instance, UNUSED void *thread, REQUEST *r
         */
        vp = fr_pair_find_by_num(request->control, 0, PW_POST_AUTH_TYPE, TAG_ANY);
 
-       if (!vp || (vp->vp_integer != PW_POST_AUTH_TYPE_REJECT)) return RLM_MODULE_NOOP;
+       if (!vp || (vp->vp_uint32 != PW_POST_AUTH_TYPE_REJECT)) return RLM_MODULE_NOOP;
 
        if (!fr_pair_find_by_num(request->packet->vps, 0, PW_EAP_MESSAGE, TAG_ANY)) {
                RDEBUG3("Request didn't contain an EAP-Message, not inserting EAP-Failure");
index 5d27aa75637331f37eaeb268fb0364226d9399c4..b6cc64e04d5bc74808f046a42d8fe0fcaedeff6c 100644 (file)
@@ -115,7 +115,7 @@ static int eap_aka_send_challenge(eap_session_t *eap_session)
         *      Set the EAP_ID - new value
         */
        vp = fr_pair_afrom_child_num(packet, fr_dict_root(fr_dict_internal), PW_EAP_ID);
-       vp->vp_integer = eap_aka_session->aka_id++;
+       vp->vp_uint32 = eap_aka_session->aka_id++;
        fr_pair_replace(to_client, vp);
 
        /*
@@ -150,7 +150,7 @@ static int eap_aka_send_challenge(eap_session_t *eap_session)
 
        /* the SUBTYPE, set to challenge. */
        vp = fr_pair_afrom_child_num(packet, dict_aka_root, PW_EAP_AKA_SUBTYPE);
-       vp->vp_integer = PW_EAP_AKA_SUBTYPE_VALUE_AKA_CHALLENGE;
+       vp->vp_uint32 = PW_EAP_AKA_SUBTYPE_VALUE_AKA_CHALLENGE;
        fr_pair_replace(to_client, vp);
 
        return 1;
@@ -177,7 +177,7 @@ static void eap_aka_send_success(eap_session_t *eap_session)
 
        /* set the EAP_ID - new value */
        vp = fr_pair_afrom_child_num(packet, fr_dict_root(fr_dict_internal), PW_EAP_ID);
-       vp->vp_integer = eap_aka_session->aka_id++;
+       vp->vp_uint32 = eap_aka_session->aka_id++;
        fr_pair_replace(&eap_session->request->reply->vps, vp);
 
        p = eap_aka_session->keys.msk;
@@ -323,7 +323,7 @@ static rlm_rcode_t mod_process(UNUSED void *arg, eap_session_t *eap_session)
        }
 
        MEM(vp = fr_pair_find_by_child_num(vps, dict_aka_root, PW_EAP_AKA_SUBTYPE, TAG_ANY));
-       subtype = vp->vp_integer;
+       subtype = vp->vp_uint32;
 
        switch (eap_aka_session->state) {
        case EAP_AKA_SERVER_CHALLENGE:
index b11915fba24981ab7c1bc10a95d98c2f408770a8..2f77b8d1137102b7937f84a84fcb717ab0c6b471 100644 (file)
@@ -664,7 +664,7 @@ static PW_CODE eap_fast_eap_payload(REQUEST *request, eap_session_t *eap_session
                VALUE_PAIR *tvp;
 
                tvp = fr_pair_afrom_num(fake, 0, PW_EAP_TYPE);
-               tvp->vp_integer = t->default_provisioning_method;
+               tvp->vp_uint32 = t->default_provisioning_method;
                fr_pair_add(&fake->control, tvp);
 
                /*
@@ -864,16 +864,16 @@ static PW_CODE eap_fast_process_tlvs(REQUEST *request, eap_session_t *eap_sessio
                         */
                        switch (vp->da->attr) {
                        case 1: /* PW_EAP_FAST_CRYPTO_BINDING_RESERVED */
-                               binding->reserved = vp->vp_integer;
+                               binding->reserved = vp->vp_uint32;
                                break;
                        case 2: /* PW_EAP_FAST_CRYPTO_BINDING_VERSION */
-                               binding->version = vp->vp_integer;
+                               binding->version = vp->vp_uint32;
                                break;
                        case 3: /* PW_EAP_FAST_CRYPTO_BINDING_RECV_VERSION */
-                               binding->received_version = vp->vp_integer;
+                               binding->received_version = vp->vp_uint32;
                                break;
                        case 4: /* PW_EAP_FAST_CRYPTO_BINDING_SUB_TYPE */
-                               binding->subtype = vp->vp_integer;
+                               binding->subtype = vp->vp_uint32;
                                break;
                        case 5: /* PW_EAP_FAST_CRYPTO_BINDING_NONCE */
                                memcpy(binding->nonce, vp->vp_octets, vp->vp_length);
@@ -886,7 +886,7 @@ static PW_CODE eap_fast_process_tlvs(REQUEST *request, eap_session_t *eap_sessio
                case EAP_FAST_TLV_PAC:
                        switch (vp->da->attr) {
                        case PAC_INFO_PAC_ACK:
-                               if (vp->vp_integer == EAP_FAST_TLV_RESULT_SUCCESS) {
+                               if (vp->vp_uint32 == EAP_FAST_TLV_RESULT_SUCCESS) {
                                        code = PW_CODE_ACCESS_ACCEPT;
                                        t->pac.expires = UINT32_MAX;
                                        t->pac.expired = false;
@@ -894,7 +894,7 @@ static PW_CODE eap_fast_process_tlvs(REQUEST *request, eap_session_t *eap_sessio
                                }
                                break;
                        case PAC_INFO_PAC_TYPE:
-                               if (vp->vp_integer != PAC_TYPE_TUNNEL) {
+                               if (vp->vp_uint32 != PAC_TYPE_TUNNEL) {
                                        RDEBUG("only able to serve Tunnel PAC's, ignoring request");
                                        continue;
                                }
index 73b9ce8b6cbb9b3d1f90783e4f1d6518e56f99e8..ff35d283bf5d10e19951d6da897b5cba7576f370 100644 (file)
@@ -282,12 +282,12 @@ error:
                switch (vp->da->attr) {
                case PAC_INFO_PAC_TYPE:
                        rad_assert(t->pac.type == 0);
-                       t->pac.type = vp->vp_integer;
+                       t->pac.type = vp->vp_uint32;
                        break;
                case PAC_INFO_PAC_LIFETIME:
                        rad_assert(t->pac.expires == 0);
-                       t->pac.expires = vp->vp_integer;
-                       t->pac.expired = (vp->vp_integer <= time(NULL));
+                       t->pac.expires = vp->vp_uint32;
+                       t->pac.expired = (vp->vp_uint32 <= time(NULL));
                        break;
                case PAC_INFO_PAC_KEY:
                        rad_assert(t->pac.key == NULL);
@@ -480,7 +480,7 @@ static rlm_rcode_t mod_session_init(void *type_arg, eap_session_t *eap_session)
         */
        vp = fr_pair_find_by_num(eap_session->request->control, 0, PW_EAP_TLS_REQUIRE_CLIENT_CERT, TAG_ANY);
        if (vp) {
-               client_cert = vp->vp_integer ? true : false;
+               client_cert = vp->vp_uint32 ? true : false;
        } else {
                client_cert = inst->req_client_cert;
        }
index 5301f6fb1523f48c82e26a43d01f2b6188987f7e..c46bc82c30a4ec36d793b552520232dd17a05129 100644 (file)
@@ -197,7 +197,7 @@ static void eap_peap_soh_verify(REQUEST *request, RADIUS_PACKET *packet,
        if (rv<0) {
                RDEBUG("SoH - error decoding payload: %s", fr_strerror());
        } else {
-               vp->vp_integer = 1;
+               vp->vp_uint32 = 1;
        }
 }
 
index c75b01fa17475e0149762953cd31f6637684c5c0..fa7a1161a47335a7136442e5f8380e1cf3e1baab 100644 (file)
@@ -233,7 +233,7 @@ static rlm_rcode_t mod_session_init(void *type_arg, eap_session_t *eap_session)
         */
        vp = fr_pair_find_by_num(eap_session->request->control, 0, PW_EAP_TLS_REQUIRE_CLIENT_CERT, TAG_ANY);
        if (vp) {
-               client_cert = vp->vp_integer ? true : false;
+               client_cert = vp->vp_uint32 ? true : false;
        } else {
                client_cert = inst->req_client_cert;
        }
index 64794414ca9b6c4753bc94d3ace0c5527dd71581..65678e789cb7672db4a7f086dfa41168d5117d01 100644 (file)
@@ -466,7 +466,7 @@ static rlm_rcode_t mod_session_init(void *instance, eap_session_t *eap_session)
         *      The fragmentation code deals with the included length
         *      so we don't need to subtract that here.
         */
-       if (vp && (vp->vp_integer > 100) && (vp->vp_integer < session->mtu)) session->mtu = vp->vp_integer - 9;
+       if (vp && (vp->vp_uint32 > 100) && (vp->vp_uint32 < session->mtu)) session->mtu = vp->vp_uint32 - 9;
 
        session->state = PWD_STATE_ID_REQ;
        session->out_pos = 0;
index dde81d0270dc255373ddee4321066870ec5b5246..0034276b31cd188399a6370bc5b8d55d3b0bc133 100644 (file)
@@ -88,7 +88,7 @@ static int eap_sim_send_state(eap_session_t *eap_session)
 
        /* set the EAP_ID - new value */
        newvp = fr_pair_afrom_child_num(packet, fr_dict_root(fr_dict_internal), PW_EAP_ID);
-       newvp->vp_integer = eap_sim_session->sim_id++;
+       newvp->vp_uint32 = eap_sim_session->sim_id++;
        fr_pair_replace(vps, newvp);
 
        /* record it in the ess */
@@ -105,7 +105,7 @@ static int eap_sim_send_state(eap_session_t *eap_session)
 
        /* the SUBTYPE, set to start. */
        newvp = fr_pair_afrom_child_num(packet, dict_sim_root, PW_EAP_SIM_SUBTYPE);
-       newvp->vp_integer = EAP_SIM_START;
+       newvp->vp_uint32 = EAP_SIM_START;
        fr_pair_replace(vps, newvp);
 
        return 0;
@@ -172,7 +172,7 @@ static int eap_sim_send_challenge(eap_session_t *eap_session)
         *      Set the EAP_ID - new value
         */
        vp = fr_pair_afrom_child_num(packet, fr_dict_root(fr_dict_internal), PW_EAP_ID);
-       vp->vp_integer = eap_sim_session->sim_id++;
+       vp->vp_uint32 = eap_sim_session->sim_id++;
        fr_pair_replace(to_client, vp);
 
        /*
@@ -220,7 +220,7 @@ static int eap_sim_send_challenge(eap_session_t *eap_session)
         *      Set subtype to challenge.
         */
        vp = fr_pair_afrom_child_num(packet, dict_sim_root, PW_EAP_SIM_SUBTYPE);
-       vp->vp_integer = EAP_SIM_CHALLENGE;
+       vp->vp_uint32 = EAP_SIM_CHALLENGE;
        fr_pair_replace(to_client, vp);
 
        return 0;
@@ -247,7 +247,7 @@ static int eap_sim_send_success(eap_session_t *eap_session)
 
        /* set the EAP_ID - new value */
        vp = fr_pair_afrom_child_num(packet, fr_dict_root(fr_dict_internal), PW_EAP_ID);
-       vp->vp_integer = eap_sim_session->sim_id++;
+       vp->vp_uint32 = eap_sim_session->sim_id++;
        fr_pair_replace(&eap_session->request->reply->vps, vp);
 
        p = eap_sim_session->keys.msk;
@@ -455,7 +455,7 @@ static rlm_rcode_t mod_process(UNUSED void *arg, eap_session_t *eap_session)
                REDEBUG2("No subtype attribute was created, message dropped");
                return 0;
        }
-       subtype = vp->vp_integer;
+       subtype = vp->vp_uint32;
 
        /*
         *      Client error supersedes anything else.
index a60ac79c0db183b9e3096b59f27d0829e0351a58..2a3d8ecb79227843b5212e55a2ae7aec07b7c4e7 100644 (file)
@@ -170,7 +170,7 @@ static rlm_rcode_t mod_session_init(void *type_arg, eap_session_t *eap_session)
         */
        vp = fr_pair_find_by_num(eap_session->request->control, 0, PW_EAP_TLS_REQUIRE_CLIENT_CERT, TAG_ANY);
        if (vp) {
-               client_cert = vp->vp_integer ? true : false;
+               client_cert = vp->vp_uint32 ? true : false;
        } else {
                client_cert = inst->req_client_cert;
        }
index a6f93fe83d65b847e10d61a1afc73026c63521e4..3f54af7fce99669a322e0d22361f19c7d155895e 100644 (file)
@@ -233,7 +233,7 @@ static rlm_rcode_t mod_session_init(void *type_arg, eap_session_t *eap_session)
         */
        vp = fr_pair_find_by_num(eap_session->request->control, 0, PW_EAP_TLS_REQUIRE_CLIENT_CERT, TAG_ANY);
        if (vp) {
-               client_cert = vp->vp_integer ? true : false;
+               client_cert = vp->vp_uint32 ? true : false;
        } else {
                client_cert = inst->req_client_cert;
        }
index d5aeb64c61baea4c65ac7a29ae66d75b2d1951f5..f25e69e1be435c16dd7eb94b0e467e95c15ca352 100644 (file)
@@ -398,7 +398,7 @@ static int vp2diameter(REQUEST *request, tls_session_t *tls_session, VALUE_PAIR
                switch (vp->vp_type) {
                case FR_TYPE_UINT32:
                case FR_TYPE_DATE:
-                       attr = htonl(vp->vp_integer); /* stored in host order */
+                       attr = htonl(vp->vp_uint32); /* stored in host order */
                        memcpy(p, &attr, sizeof(attr));
                        length = 4;
                        break;
index 8896387703f0d7957b356bb93c2897b37b3c8dcc..7cabbf893b02d0c9d5cc0927f59fce5e72945f3b 100644 (file)
@@ -43,7 +43,7 @@ static int connectcmp(UNUSED void *instance,
        VERIFY_VP(check);
 
        rate = atoi(req->vp_strvalue);
-       return rate - check->vp_integer;
+       return rate - check->vp_uint32;
 }
 
 /*
@@ -106,7 +106,7 @@ static int presufcmp(UNUSED void *instance,
         *      If Strip-User-Name == No, then don't do any more.
         */
        vp = fr_pair_find_by_num(check_pairs, 0, PW_STRIP_USER_NAME, TAG_ANY);
-       if (vp && !vp->vp_integer) return ret;
+       if (vp && !vp->vp_uint32) return ret;
 
        /*
         *      See where to put the stripped user name.
@@ -140,7 +140,7 @@ static int packetcmp(UNUSED void *instance,
 {
        VERIFY_VP(check);
 
-       if (request->packet->code == check->vp_integer) {
+       if (request->packet->code == check->vp_uint32) {
                return 0;
        }
 
@@ -159,7 +159,7 @@ static int responsecmp(UNUSED void *instance,
 {
        VERIFY_VP(check);
 
-       if (request->reply->code == check->vp_integer) {
+       if (request->reply->code == check->vp_uint32) {
                return 0;
        }
 
index 9ce6eb4d3d411f1bdb4a9525327af0f8d4002ccd..1d12fe4c053ea48ca9e5439c0e1ddd7dab93238a 100644 (file)
@@ -73,7 +73,7 @@ static int fall_through(VALUE_PAIR *vp)
        VALUE_PAIR *tmp;
        tmp = fr_pair_find_by_num(vp, 0, PW_FALL_THROUGH, TAG_ANY);
 
-       return tmp ? tmp->vp_integer : 0;
+       return tmp ? tmp->vp_uint32 : 0;
 }
 
 static const CONF_PARSER module_config[] = {
index 8da846b2c641c87428c596520b59a5370c18816d..39af53b6de26da95082ecf7bb26c8651ad6044d1 100644 (file)
@@ -55,7 +55,7 @@ int fr_json_object_to_value_box(TALLOC_CTX *ctx, fr_value_box_t *out, json_objec
 
        case json_type_double:
                in.type = FR_TYPE_FLOAT64;
-               in.datum.decimal = json_object_get_double(object);
+               in.datum.float64 = json_object_get_double(object);
                break;
 
        case json_type_int:
@@ -91,13 +91,13 @@ int fr_json_object_to_value_box(TALLOC_CTX *ctx, fr_value_box_t *out, json_objec
                        in.datum.int32 = num;
                } else if (num > UINT16_MAX) {  /* 32bit unsigned (supported) */
                        in.type = FR_TYPE_UINT32;
-                       in.datum.integer = (uint32_t) num;
+                       in.datum.uint32 = (uint32_t) num;
                } else if (num > UINT8_MAX) {   /* 16bit unsigned (supported) */
                        in.type = FR_TYPE_UINT16;
                        in.datum.uint16 = (uint16_t) num;
                } else {                /* 8bit unsigned (supported) */
                        in.type = FR_TYPE_UINT8;
-                       in.datum.byte = (uint8_t) num;
+                       in.datum.uint8 = (uint8_t) num;
                }
        }
                break;
@@ -145,10 +145,10 @@ json_object *json_object_from_value_box(TALLOC_CTX *ctx, fr_value_box_t const *d
        }
 
        case FR_TYPE_BOOL:
-               return json_object_new_boolean(data->datum.byte);
+               return json_object_new_boolean(data->datum.uint8);
 
        case FR_TYPE_UINT8:
-               return json_object_new_int(data->datum.byte);
+               return json_object_new_int(data->datum.uint8);
 
        case FR_TYPE_UINT16:
                return json_object_new_int(data->datum.uint16);
@@ -217,7 +217,7 @@ size_t fr_json_from_pair(char *out, size_t outlen, VALUE_PAIR const *vp)
                case FR_TYPE_UINT32:
                        if (vp->da->flags.has_value) break;
 
-                       return snprintf(out, freespace, "%u", vp->vp_integer);
+                       return snprintf(out, freespace, "%u", vp->vp_uint32);
 
                case FR_TYPE_UINT16:
                        if (vp->da->flags.has_value) break;
@@ -227,7 +227,7 @@ size_t fr_json_from_pair(char *out, size_t outlen, VALUE_PAIR const *vp)
                case FR_TYPE_UINT8:
                        if (vp->da->flags.has_value) break;
 
-                       return snprintf(out, freespace, "%u", (unsigned int) vp->vp_byte);
+                       return snprintf(out, freespace, "%u", (unsigned int) vp->vp_uint8);
 
                case FR_TYPE_INT32:
                        return snprintf(out, freespace, "%d", vp->vp_signed);
@@ -373,7 +373,7 @@ const char *fr_json_afrom_pair_list(TALLOC_CTX *ctx, VALUE_PAIR **vps, const cha
                                json_object_object_add(vp_object, "mapping", mapping);
                        }
 
-                       dv = fr_dict_enum_by_da(NULL, vp->da, vp->vp_integer);
+                       dv = fr_dict_enum_by_da(NULL, vp->da, vp->vp_uint32);
                        if (dv) {
                                struct json_object *mapped_value;
 
index 6ae8d2413e77e9fc9188a63b4b5505f45cdc349f..24a6ae5d7c5e95043c71be452f8fc99df0d04744 100644 (file)
@@ -177,12 +177,12 @@ static rlm_rcode_t CC_HINT(nonnull) mod_authorize(void *instance, UNUSED void *t
 
        timeout = fr_pair_find_by_num(request->reply->vps, 0, PW_SESSION_TIMEOUT, TAG_ANY);
        if (timeout) {  /* just update... */
-               if (timeout->vp_integer > (unsigned int) left) {
-                       timeout->vp_integer = left;
+               if (timeout->vp_uint32 > (unsigned int) left) {
+                       timeout->vp_uint32 = left;
                }
        } else {
                timeout = radius_pair_create(request->reply, &request->reply->vps, PW_SESSION_TIMEOUT, 0);
-               timeout->vp_integer = left;
+               timeout->vp_uint32 = left;
        }
 
        RDEBUG("reply:Session-Timeout set to %d", left);
index 7e24d99a931baf0a438a4ca3dd5cb623b967a370..26ce8c3d8ae9604e0443e822d67933a441b60f63 100644 (file)
@@ -79,7 +79,7 @@ static int rlm_lua_marshall(lua_State *L, VALUE_PAIR const *vp)
        case FR_TYPE_UINT16:
        case FR_TYPE_UINT32:
        case FR_TYPE_INT32:
-               lua_pushinteger(L, vp->vp_integer);
+               lua_pushinteger(L, vp->vp_uint32);
                break;
 
        default:
@@ -117,7 +117,7 @@ static int rlm_lua_unmarshall(VALUE_PAIR **out, REQUEST *request, lua_State *L,
                }
 
                case FR_TYPE_UINT32:
-                       vp->vp_integer = (uint32_t) lua_tointeger(L, -1);
+                       vp->vp_uint32 = (uint32_t) lua_tointeger(L, -1);
                        break;
 
                case FR_TYPE_IPV4_ADDR:
@@ -137,7 +137,7 @@ static int rlm_lua_unmarshall(VALUE_PAIR **out, REQUEST *request, lua_State *L,
                        break;
 
                case FR_TYPE_UINT8:
-                       vp->vp_byte = (uint8_t) lua_tointeger(L, -1);
+                       vp->vp_uint8 = (uint8_t) lua_tointeger(L, -1);
                        break;
 
                case FR_TYPE_UINT16:
index 48737b18c9e3e55881eeb21708daeaddb800498a..a77dc68ae85c069a5d3cada1d37a422ec184416f 100644 (file)
@@ -130,7 +130,7 @@ void mschap_auth_response(char const *username,
 
        /*
         *      Encode the value of 'Digest' as "S=" followed by
-        *      40 ASCII hexadecimal digits and return it in
+        *      40 ASCII hexafloat64 digits and return it in
         *      AuthenticatorResponse.
         *      For example,
         *      "S=0123456789ABCDEF0123456789ABCDEF01234567"
@@ -139,7 +139,7 @@ void mschap_auth_response(char const *username,
        response[1] = '=';
 
        /*
-        *      The hexadecimal digits [A-F] MUST be uppercase.
+        *      The hexafloat64 digits [A-F] MUST be uppercase.
         */
        for (i = 0; i < sizeof(digest); i++) {
                response[2 + (i * 2)] = hex[(digest[i] >> 4) & 0x0f];
index 42d1388beb20f8791c7f38810520f08773c496bf..47efa8daa190908db4b3a90d5b216e43a9592339 100644 (file)
@@ -1414,7 +1414,7 @@ static rlm_rcode_t mschap_error(rlm_mschap_t const *inst, REQUEST *request, unsi
 
        if ((mschap_result == -648) ||
            ((mschap_result == 0) &&
-            (smb_ctrl && ((smb_ctrl->vp_integer & ACB_PW_EXPIRED) != 0)))) {
+            (smb_ctrl && ((smb_ctrl->vp_uint32 & ACB_PW_EXPIRED) != 0)))) {
                REDEBUG("Password has expired.  User should retry authentication");
                error = 648;
 
@@ -1432,8 +1432,8 @@ static rlm_rcode_t mschap_error(rlm_mschap_t const *inst, REQUEST *request, unsi
                 *      return 'not found'.
                 */
        } else if ((mschap_result == -691) ||
-                  (smb_ctrl && (((smb_ctrl->vp_integer & ACB_DISABLED) != 0) ||
-                                ((smb_ctrl->vp_integer & (ACB_NORMAL|ACB_WSTRUST)) == 0)))) {
+                  (smb_ctrl && (((smb_ctrl->vp_uint32 & ACB_DISABLED) != 0) ||
+                                ((smb_ctrl->vp_uint32 & (ACB_NORMAL|ACB_WSTRUST)) == 0)))) {
                REDEBUG("SMB-Account-Ctrl (or ntlm_auth) "
                        "says that the account is disabled, "
                        "or is not a normal or workstation trust account");
@@ -1446,7 +1446,7 @@ static rlm_rcode_t mschap_error(rlm_mschap_t const *inst, REQUEST *request, unsi
                 *      User is locked out.
                 */
        } else if ((mschap_result == -647) ||
-                  (smb_ctrl && ((smb_ctrl->vp_integer & ACB_AUTOLOCK) != 0))) {
+                  (smb_ctrl && ((smb_ctrl->vp_uint32 & ACB_AUTOLOCK) != 0))) {
                REDEBUG("SMB-Account-Ctrl (or ntlm_auth) "
                        "says that the account is locked out");
                error = 647;
@@ -1796,7 +1796,7 @@ static rlm_rcode_t CC_HINT(nonnull) mod_authenticate(void *instance, UNUSED void
         */
        if (auth_method != AUTH_INTERNAL) {
                VALUE_PAIR *vp = fr_pair_find_by_num(request->control, 0, PW_MS_CHAP_USE_NTLM_AUTH, TAG_ANY);
-               if (vp && vp->vp_integer == 0) auth_method = AUTH_INTERNAL;
+               if (vp && vp->vp_uint32 == 0) auth_method = AUTH_INTERNAL;
        }
 
        /*
@@ -1809,7 +1809,7 @@ static rlm_rcode_t CC_HINT(nonnull) mod_authenticate(void *instance, UNUSED void
                if (password) {
                        smb_ctrl = pair_make_config("SMB-Account-CTRL", "0", T_OP_SET);
                        if (smb_ctrl) {
-                               smb_ctrl->vp_integer = pdb_decode_acct_ctrl(password->vp_strvalue);
+                               smb_ctrl->vp_uint32 = pdb_decode_acct_ctrl(password->vp_strvalue);
                        }
                }
        }
@@ -1822,7 +1822,7 @@ static rlm_rcode_t CC_HINT(nonnull) mod_authenticate(void *instance, UNUSED void
                /*
                 *      Password is not required.
                 */
-               if ((smb_ctrl->vp_integer & ACB_PWNOTREQ) != 0) {
+               if ((smb_ctrl->vp_uint32 & ACB_PWNOTREQ) != 0) {
                        RDEBUG2("SMB-Account-Ctrl says no password is required");
                        return RLM_MODULE_OK;
                }
@@ -1867,9 +1867,9 @@ static rlm_rcode_t CC_HINT(nonnull) mod_authenticate(void *instance, UNUSED void
                 *      obviously the password change action will need
                 *      to have cleared this bit in the config/SQL/wherever.
                 */
-               if (smb_ctrl && smb_ctrl->vp_integer & ACB_PW_EXPIRED) {
+               if (smb_ctrl && smb_ctrl->vp_uint32 & ACB_PW_EXPIRED) {
                        RDEBUG("Clearing expiry bit in SMB-Acct-Ctrl to allow authentication");
-                       smb_ctrl->vp_integer &= ~ACB_PW_EXPIRED;
+                       smb_ctrl->vp_uint32 &= ~ACB_PW_EXPIRED;
                }
 
                /*
index b8aa9cb196b6f7fb75be8e36ee5eebd55828b1a7..5f20c3f439a6036fb75c3367530a56866e86f9a7 100644 (file)
@@ -447,8 +447,8 @@ static rlm_rcode_t CC_HINT(nonnull) mod_authorize(void *instance, UNUSED void *t
                         *      Auth-Type := Accept
                         *      Auth-Type := Reject
                         */
-                       if ((vp->vp_integer == 254) ||
-                           (vp->vp_integer == 4)) {
+                       if ((vp->vp_uint32 == 254) ||
+                           (vp->vp_uint32 == 4)) {
                            found_pw = true;
                        }
                        break;
@@ -477,9 +477,9 @@ static rlm_rcode_t CC_HINT(nonnull) mod_authorize(void *instance, UNUSED void *t
                 */
                vp = fr_pair_find_by_num(request->packet->vps, 0, PW_EAP_TYPE, TAG_ANY);
                if (vp &&
-                   ((vp->vp_integer == 13) || /* EAP-TLS */
-                    (vp->vp_integer == 21) || /* EAP-TTLS */
-                    (vp->vp_integer == 25))) { /* PEAP */
+                   ((vp->vp_uint32 == 13) || /* EAP-TLS */
+                    (vp->vp_uint32 == 21) || /* EAP-TTLS */
+                    (vp->vp_uint32 == 25))) {  /* PEAP */
                        return RLM_MODULE_NOOP;
                }
 
@@ -508,7 +508,7 @@ static rlm_rcode_t CC_HINT(nonnull) mod_authorize(void *instance, UNUSED void *t
        if (inst->auth_type) {
                vp = radius_pair_create(request, &request->control,
                                       PW_AUTH_TYPE, 0);
-               vp->vp_integer = inst->auth_type;
+               vp->vp_uint32 = inst->auth_type;
        }
 
        return RLM_MODULE_UPDATED;
index df7dddbdabd5f6fa666fe82f1b1a2e566d8feff8..7a999f4ccf168e18d1e7ec1ea3bc5bd07f77dcc8 100644 (file)
@@ -1025,7 +1025,7 @@ static rlm_rcode_t CC_HINT(nonnull) mod_accounting(void *instance, UNUSED void *
        int             acctstatustype = 0;
 
        if ((pair = fr_pair_find_by_num(request->packet->vps, 0, PW_ACCT_STATUS_TYPE, TAG_ANY)) != NULL) {
-               acctstatustype = pair->vp_integer;
+               acctstatustype = pair->vp_uint32;
        } else {
                RDEBUG("Invalid Accounting Packet");
                return RLM_MODULE_INVALID;
index b78cd17555081a0f28f110238d36e71bced5116d..7924fdb63e3dee10903983d05c09e2a6232c6097 100644 (file)
@@ -67,7 +67,7 @@ static int fall_through(VALUE_PAIR *vp)
        VALUE_PAIR *tmp;
        tmp = fr_pair_find_by_num(vp, 0, PW_FALL_THROUGH, TAG_ANY);
 
-       return tmp ? tmp->vp_integer : 0;
+       return tmp ? tmp->vp_uint32 : 0;
 }
 
 /*
@@ -85,11 +85,11 @@ static void ascend_nasport_hack(VALUE_PAIR *nas_port, int channels_per_line)
                return;
        }
 
-       if (nas_port->vp_integer > 9999) {
-               service = nas_port->vp_integer/10000; /* 1=digital 2=analog */
-               line = (nas_port->vp_integer - (10000 * service)) / 100;
-               channel = nas_port->vp_integer - ((10000 * service) + (100 * line));
-               nas_port->vp_integer = (channel - 1) + ((line - 1) * channels_per_line);
+       if (nas_port->vp_uint32 > 9999) {
+               service = nas_port->vp_uint32/10000; /* 1=digital 2=analog */
+               line = (nas_port->vp_uint32 - (10000 * service)) / 100;
+               channel = nas_port->vp_uint32 - ((10000 * service) + (100 * line));
+               nas_port->vp_uint32 = (channel - 1) + ((line - 1) * channels_per_line);
        }
 }
 
@@ -288,7 +288,7 @@ static void rad_mangle(rlm_preprocess_t const *inst, REQUEST *request)
        if (fr_pair_find_by_num(request_pairs, 0, PW_FRAMED_PROTOCOL, TAG_ANY) != NULL &&
            fr_pair_find_by_num(request_pairs, 0, PW_SERVICE_TYPE, TAG_ANY) == NULL) {
                tmp = radius_pair_create(request->packet, &request->packet->vps, PW_SERVICE_TYPE, 0);
-               tmp->vp_integer = PW_FRAMED_USER;
+               tmp->vp_uint32 = PW_FRAMED_USER;
        }
 
        num_proxy_state = 0;
@@ -663,10 +663,10 @@ static rlm_rcode_t CC_HINT(nonnull) mod_preaccounting(void *instance, UNUSED voi
 
                delay = fr_pair_find_by_num(request->packet->vps, 0, PW_ACCT_DELAY_TIME, TAG_ANY);
                if (delay) {
-                       if ((delay->vp_integer >= vp->vp_date) || (delay->vp_integer == UINT32_MAX)) {
-                               RWARN("Ignoring invalid Acct-Delay-time of %u seconds", delay->vp_integer);
+                       if ((delay->vp_uint32 >= vp->vp_date) || (delay->vp_uint32 == UINT32_MAX)) {
+                               RWARN("Ignoring invalid Acct-Delay-time of %u seconds", delay->vp_uint32);
                        } else {
-                               vp->vp_date -= delay->vp_integer;
+                               vp->vp_date -= delay->vp_uint32;
                        }
                }
        }
index b719ec5a70e566851626fa6a019784881f953166..62ed8a8e9163813ae5c42913a00be9532f34297c 100644 (file)
@@ -366,11 +366,11 @@ static int mod_populate_vptuple(PyObject *pp, VALUE_PAIR *vp)
                break;
 
        case FR_TYPE_UINT32:
-               value = PyLong_FromUnsignedLong(vp->vp_integer);
+               value = PyLong_FromUnsignedLong(vp->vp_uint32);
                break;
 
        case FR_TYPE_UINT8:
-               value = PyLong_FromUnsignedLong(vp->vp_byte);
+               value = PyLong_FromUnsignedLong(vp->vp_uint8);
                break;
 
        case FR_TYPE_UINT16:
@@ -390,7 +390,7 @@ static int mod_populate_vptuple(PyObject *pp, VALUE_PAIR *vp)
                break;
 
        case FR_TYPE_FLOAT64:
-               value = PyFloat_FromDouble(vp->vp_decimal);
+               value = PyFloat_FromDouble(vp->vp_float64);
                break;
 
        case FR_TYPE_BOOL:
index 3c4edeecfeffc09954a8d7afb482bbaede5c2352..e0e8ca5b4525c72d8fbb3cd4ac366ca21a59c9b6 100644 (file)
@@ -176,7 +176,7 @@ static rlm_rcode_t CC_HINT(nonnull) mod_accounting(void *instance, UNUSED void *
                RDEBUG2("No Accounting-Status-Type record");
                return RLM_MODULE_NOOP;
        }
-       status = vp->vp_integer;
+       status = vp->vp_uint32;
 
        /*
         *      Look for weird reboot packets.
@@ -228,7 +228,7 @@ static rlm_rcode_t CC_HINT(nonnull) mod_accounting(void *instance, UNUSED void *
                        break;
 
                case PW_FRAMED_PROTOCOL:
-                       protocol = vp->vp_integer;
+                       protocol = vp->vp_uint32;
                        break;
 
                case PW_NAS_IP_ADDRESS:
@@ -236,12 +236,12 @@ static rlm_rcode_t CC_HINT(nonnull) mod_accounting(void *instance, UNUSED void *
                        break;
 
                case PW_NAS_PORT:
-                       ut.nas_port = vp->vp_integer;
+                       ut.nas_port = vp->vp_uint32;
                        port_seen = true;
                        break;
 
                case PW_ACCT_DELAY_TIME:
-                       ut.delay = vp->vp_integer;
+                       ut.delay = vp->vp_uint32;
                        break;
 
                case PW_ACCT_SESSION_ID:
@@ -264,8 +264,8 @@ static rlm_rcode_t CC_HINT(nonnull) mod_accounting(void *instance, UNUSED void *
                        break;
 
                case PW_NAS_PORT_TYPE:
-                       if (vp->vp_integer <= 4)
-                               ut.porttype = porttypes[vp->vp_integer];
+                       if (vp->vp_uint32 <= 4)
+                               ut.porttype = porttypes[vp->vp_uint32];
                        break;
 
                case PW_CALLING_STATION_ID:
index 5207b335bfb241b40c2b389bb6e23e42b13bc558..375c54b62f857d5dcd565ac32ec9d6545e2efe66 100644 (file)
@@ -219,7 +219,7 @@ int fr_redis_reply_to_value_box(TALLOC_CTX *ctx, fr_value_box_t *out, redisReply
                }
                else if (reply->integer > UINT16_MAX) { /* 32bit unsigned (supported) */
                        in.type = FR_TYPE_UINT32;
-                       in.datum.integer = (uint32_t) reply->integer;
+                       in.datum.uint32 = (uint32_t) reply->integer;
                }
                else if (reply->integer > UINT8_MAX) {  /* 16bit unsigned (supported) */
                        in.type = FR_TYPE_UINT16;
@@ -227,7 +227,7 @@ int fr_redis_reply_to_value_box(TALLOC_CTX *ctx, fr_value_box_t *out, redisReply
                }
                else {          /* 8bit unsigned (supported) */
                        in.type = FR_TYPE_UINT8;
-                       in.datum.byte = (uint8_t) reply->integer;
+                       in.datum.uint8 = (uint8_t) reply->integer;
                }
                break;
 
index a8ca47d1740668eab723a482eff9058c2bf44053..5b1b097044a79254b3ec0e63829639cf6545ca31 100644 (file)
@@ -641,7 +641,7 @@ static ippool_rcode_t redis_ippool_allocate(rlm_redis_ippool_t const *inst, REQU
 
                                memset(&tmp, 0, sizeof(tmp));
 
-                               tmp.datum.integer = ntohl((uint32_t)reply->element[1]->integer);
+                               tmp.datum.uint32 = ntohl((uint32_t)reply->element[1]->integer);
                                tmp.type = FR_TYPE_UINT32;
 
                                if (fr_value_box_cast(NULL, &ip_map.rhs->tmpl_value_box, FR_TYPE_IPV4_ADDR,
@@ -651,7 +651,7 @@ static ippool_rcode_t redis_ippool_allocate(rlm_redis_ippool_t const *inst, REQU
                                        goto finish;
                                }
                        } else {
-                               ip_map.rhs->tmpl_fr_value_box_datum.integer = ntohl((uint32_t)reply->element[1]->integer);
+                               ip_map.rhs->tmpl_fr_value_box_datum.uint32 = ntohl((uint32_t)reply->element[1]->integer);
                                ip_map.rhs->tmpl_fr_value_box_type = FR_TYPE_UINT32;
                        }
                }
@@ -743,7 +743,7 @@ static ippool_rcode_t redis_ippool_allocate(rlm_redis_ippool_t const *inst, REQU
                        goto finish;
                }
 
-               expiry_map.rhs->tmpl_fr_value_box_datum.integer = reply->element[3]->integer;
+               expiry_map.rhs->tmpl_fr_value_box_datum.uint32 = reply->element[3]->integer;
                expiry_map.rhs->tmpl_fr_value_box_type = FR_TYPE_UINT32;
                if (map_to_request(request, &expiry_map, map_to_vp, NULL) < 0) {
                        ret = IPPOOL_RCODE_FAIL;
@@ -885,7 +885,7 @@ static ippool_rcode_t redis_ippool_update(rlm_redis_ippool_t const *inst, REQUES
                        .rhs = &expiry_rhs
                };
 
-               expiry_map.rhs->tmpl_fr_value_box_datum.integer = expires;
+               expiry_map.rhs->tmpl_fr_value_box_datum.uint32 = expires;
                expiry_map.rhs->tmpl_fr_value_box_type = FR_TYPE_UINT32;
                if (map_to_request(request, &expiry_map, map_to_vp, NULL) < 0) {
                        ret = IPPOOL_RCODE_FAIL;
@@ -1233,7 +1233,7 @@ static rlm_rcode_t mod_accounting(void *instance, UNUSED void *thread, REQUEST *
         *      Pool-Action override
         */
        vp = fr_pair_find_by_num(request->control, 0, PW_POOL_ACTION, TAG_ANY);
-       if (vp) return mod_action(inst, request, vp->vp_integer);
+       if (vp) return mod_action(inst, request, vp->vp_uint32);
 
        /*
         *      Otherwise, guess the action by Acct-Status-Type
@@ -1244,7 +1244,7 @@ static rlm_rcode_t mod_accounting(void *instance, UNUSED void *thread, REQUEST *
                return RLM_MODULE_NOOP;
        }
 
-       switch (vp->vp_integer) {
+       switch (vp->vp_uint32) {
        case PW_STATUS_START:
        case PW_STATUS_ALIVE:
                return mod_action(inst, request, POOL_ACTION_UPDATE);
@@ -1272,7 +1272,7 @@ static rlm_rcode_t mod_authorize(void *instance, UNUSED void *thread, REQUEST *r
         *      when called in Post-Auth.
         */
        vp = fr_pair_find_by_num(request->control, 0, PW_POOL_ACTION, TAG_ANY);
-       return mod_action(inst, request, vp ? vp->vp_integer : POOL_ACTION_ALLOCATE);
+       return mod_action(inst, request, vp ? vp->vp_uint32 : POOL_ACTION_ALLOCATE);
 }
 
 static rlm_rcode_t mod_post_auth(void *instance, UNUSED void *thread, REQUEST *request) CC_HINT(nonnull);
@@ -1286,7 +1286,7 @@ static rlm_rcode_t mod_post_auth(void *instance, UNUSED void *thread, REQUEST *r
         *      when called in Post-Auth.
         */
        vp = fr_pair_find_by_num(request->control, 0, PW_POOL_ACTION, TAG_ANY);
-       return mod_action(inst, request, vp ? vp->vp_integer : POOL_ACTION_ALLOCATE);
+       return mod_action(inst, request, vp ? vp->vp_uint32 : POOL_ACTION_ALLOCATE);
 }
 
 static int mod_instantiate(CONF_SECTION *conf, void *instance)
index 43fdd23ede8ec44832fdb8d2ebd0ec1dfbb03c21..f8c93584ed7c1055d5ef00f77991f45a56cc8622 100644 (file)
@@ -180,9 +180,9 @@ static rlm_rcode_t CC_HINT(nonnull) mod_accounting(void *instance, UNUSED void *
                return RLM_MODULE_NOOP;
        }
 
-       dv = fr_dict_enum_by_da(NULL, vp->da, vp->vp_integer);
+       dv = fr_dict_enum_by_da(NULL, vp->da, vp->vp_uint32);
        if (!dv) {
-               RDEBUG("Unknown Acct-Status-Type %u", vp->vp_integer);
+               RDEBUG("Unknown Acct-Status-Type %u", vp->vp_uint32);
                return RLM_MODULE_NOOP;
        }
 
index 2c852c42f3b23f5d547ffc15cba83e637d84ef1b..44003b452532e5be0e3474cb52a928e2d9668f87 100644 (file)
@@ -925,7 +925,7 @@ static VALUE_PAIR *json_pair_make_leaf(UNUSED rlm_rest_t const *instance, UNUSED
 
        case json_type_double:
                if (flags->do_xlat) RWDEBUG("Ignoring do_xlat on 'double', attribute \"%s\"", da->name);
-               src.datum.decimal = json_object_get_double(leaf);
+               src.datum.float64 = json_object_get_double(leaf);
                src.type = FR_TYPE_FLOAT64;
                break;
 
index 7d7e3bbf4e670659f2d9b17e9fa4a397178ab868..5b94d9b2067003c049ba46a63f406accdbbe60bb 100644 (file)
@@ -115,7 +115,7 @@ static int rlm_rest_status_update(REQUEST *request,  void *handle)
        RDEBUG2("&REST-HTTP-Status-Code := %i", code);
        REXDENT();
 
-       value.datum.integer = code;
+       value.datum.uint32 = code;
 
        /*
         *      Find the reply list, and appropriate context in the
index 5f38632a3a6e51fc1eb6175fadca5ae55f8e2363..0de5c484cb64467a637303a5440eb6f581dac74a 100644 (file)
@@ -508,7 +508,7 @@ static rlm_rcode_t CC_HINT(nonnull) mod_authenticate(void *instance, UNUSED void
                vp = fr_pair_afrom_num(request->reply, 0, PW_PROMPT);
 
                rad_assert(vp != NULL);
-               vp->vp_integer = 0; /* no echo */
+               vp->vp_uint32 = 0; /* no echo */
                fr_pair_add(&request->reply->vps, vp);
 
                /* Mark the packet as a Acceess-Challenge Packet */
index 9a965812e6a2301060cf5ffa1d923e7cb45dde14..fb5bdf46a93d784971a3105393c37cb811754f29 100644 (file)
@@ -62,11 +62,11 @@ static ssize_t soh_xlat(UNUSED TALLOC_CTX *ctx, char **out, size_t outlen,
                vp[4] = fr_pair_find_by_num(request->packet->vps, 0, PW_SOH_MS_MACHINE_SP_VERSION, TAG_ANY);
                vp[5] = fr_pair_find_by_num(request->packet->vps, 0, PW_SOH_MS_MACHINE_SP_RELEASE, TAG_ANY);
 
-               if (vp[0] && vp[0]->vp_integer == VENDORPEC_MICROSOFT) {
+               if (vp[0] && vp[0]->vp_uint32 == VENDORPEC_MICROSOFT) {
                        if (!vp[1]) {
                                snprintf(*out, outlen, "Windows unknown");
                        } else {
-                               switch (vp[1]->vp_integer) {
+                               switch (vp[1]->vp_uint32) {
                                case 7:
                                        osname = "7";
                                        break;
@@ -83,11 +83,11 @@ static ssize_t soh_xlat(UNUSED TALLOC_CTX *ctx, char **out, size_t outlen,
                                        osname = "Other";
                                        break;
                                }
-                               snprintf(*out, outlen, "Windows %s %d.%d.%d sp %d.%d", osname, vp[1]->vp_integer,
-                                        vp[2] ? vp[2]->vp_integer : 0,
-                                        vp[3] ? vp[3]->vp_integer : 0,
-                                        vp[4] ? vp[4]->vp_integer : 0,
-                                        vp[5] ? vp[5]->vp_integer : 0);
+                               snprintf(*out, outlen, "Windows %s %d.%d.%d sp %d.%d", osname, vp[1]->vp_uint32,
+                                        vp[2] ? vp[2]->vp_uint32 : 0,
+                                        vp[3] ? vp[3]->vp_uint32 : 0,
+                                        vp[4] ? vp[4]->vp_uint32 : 0,
+                                        vp[5] ? vp[5]->vp_uint32 : 0);
                        }
                        return strlen(*out);
                }
index 3732daa7748f22559c5ced94d8d76b8f96e73008..ea70c456c8df3d3b1db4e6ae89f9074618a69ffa 100644 (file)
@@ -132,7 +132,7 @@ static sql_fall_through_t fall_through(VALUE_PAIR *vp)
        VALUE_PAIR *tmp;
        tmp = fr_pair_find_by_num(vp, 0, PW_FALL_THROUGH, TAG_ANY);
 
-       return tmp ? tmp->vp_integer : FALL_THROUGH_DEFAULT;
+       return tmp ? tmp->vp_uint32 : FALL_THROUGH_DEFAULT;
 }
 
 /*
index 01258e9e9b5779d2fd15b08136c5d436445c659b..4fd0487188462da4aa9e53af5a27764bc55225f5 100644 (file)
@@ -489,7 +489,7 @@ static rlm_rcode_t CC_HINT(nonnull) mod_authorize(void *instance, UNUSED void *t
 
                        RDEBUG2("Time remaining (%" PRIu64 "s) is greater than time to reset (%" PRIu64 "s).  "
                                "Adding %" PRIu64 "s to reply value", to_reset, res, to_reset);
-                       res = to_reset + limit->vp_integer;
+                       res = to_reset + limit->vp_uint32;
                }
 
                /*
index 49011ed9d4a76ada987974d19d9cc3efcd4a6ce6..91f37207863a0901b5adf562deed27a875b6cf2a 100644 (file)
@@ -611,7 +611,7 @@ static rlm_rcode_t CC_HINT(nonnull) mod_accounting(void *instance, UNUSED void *
 
        vp = fr_pair_find_by_num(request->packet->vps, 0, PW_ACCT_STATUS_TYPE, TAG_ANY);
        if (vp) {
-               acct_type = vp->vp_integer;
+               acct_type = vp->vp_uint32;
        }
        else {
                REDEBUG("Couldn't find type of accounting packet");
index 2a38f519fd52d7870cdb7f323d433f7c3995803a..c979ba2a558ff73e8d05d34a77e30c892436f0b2 100644 (file)
@@ -641,7 +641,7 @@ static rlm_rcode_t CC_HINT(nonnull) mod_accounting(void *instance, UNUSED void *
                RDEBUG("Could not find account status type in packet");
                return RLM_MODULE_NOOP;
        }
-       acct_status_type = vp->vp_integer;
+       acct_status_type = vp->vp_uint32;
 
        switch (acct_status_type) {
        case PW_STATUS_START:
index 0c27c00ce6d2f0108f7e8e829a4bde8266127674..ad0f186355f07dccbdbc2a2b56f76ff8a01d87e1 100644 (file)
@@ -397,7 +397,7 @@ static rlm_rcode_t CC_HINT(nonnull) mod_accounting(void *instance, UNUSED void *
                RDEBUG("no Accounting-Status-Type attribute in request");
                return RLM_MODULE_NOOP;
        }
-       status = vp->vp_integer;
+       status = vp->vp_uint32;
 
        /*
         *      FIXME: handle PW_STATUS_ALIVE like 1.5.4.3 did.
@@ -437,7 +437,7 @@ static rlm_rcode_t CC_HINT(nonnull) mod_accounting(void *instance, UNUSED void *
                                break;
 #ifdef USER_PROCESS
                case PW_FRAMED_PROTOCOL:
-                       protocol = vp->vp_integer;
+                       protocol = vp->vp_uint32;
                        break;
 #endif
                case PW_NAS_IP_ADDRESS:
@@ -445,7 +445,7 @@ static rlm_rcode_t CC_HINT(nonnull) mod_accounting(void *instance, UNUSED void *
                        break;
 
                case PW_NAS_PORT:
-                       nas_port = vp->vp_integer;
+                       nas_port = vp->vp_uint32;
                        port_seen = true;
                        break;
 
index 01b6fc5b63fd1db956ede7a68ba14d34e9a06ae7..88634469cd54f8ce40899ea5fb5420513b4d0015 100644 (file)
@@ -118,7 +118,7 @@ static ssize_t unpack_xlat(UNUSED TALLOC_CTX *ctx, char **out, size_t outlen,
 
        offset = (int) strtoul(data_size, &p, 10);
        if (*p) {
-               REDEBUG("unpack requires a decimal number, not '%s'", data_size);
+               REDEBUG("unpack requires a float64 number, not '%s'", data_size);
                goto nothing;
        }
 
@@ -160,7 +160,7 @@ static ssize_t unpack_xlat(UNUSED TALLOC_CTX *ctx, char **out, size_t outlen,
        case FR_TYPE_INT32:
        case FR_TYPE_UINT32:
        case FR_TYPE_DATE:
-               cast->vp_integer = ntohl(cast->vp_integer);
+               cast->vp_uint32 = ntohl(cast->vp_uint32);
                break;
 
        case FR_TYPE_UINT16:
index c8894768746dc14a62f272e0286107b7255e19be..b0dd731a414e0e2de0509355b14ea2a930769d26 100644 (file)
@@ -213,7 +213,7 @@ static rlm_rcode_t CC_HINT(nonnull) mod_post_auth(void *instance, UNUSED void *t
                RWDEBUG("Not calculating MN-HA keys");
        }
 
-       if (vp) switch (vp->vp_integer) {
+       if (vp) switch (vp->vp_uint32) {
        case 2:                 /* PMIP4 */
                /*
                 *      Look for WiMAX-hHA-IP-MIP4
@@ -261,7 +261,7 @@ static rlm_rcode_t CC_HINT(nonnull) mod_post_auth(void *instance, UNUSED void *t
                        RWDEBUG("Failed creating WiMAX-MN-hHA-MIP4-SPI");
                        break;
                }
-               vp->vp_integer = mip_spi + 1;
+               vp->vp_uint32 = mip_spi + 1;
                break;
 
        case 3:                 /* CMIP4 */
@@ -311,7 +311,7 @@ static rlm_rcode_t CC_HINT(nonnull) mod_post_auth(void *instance, UNUSED void *t
                        RWDEBUG("Failed creating WiMAX-MN-hHA-MIP4-SPI");
                        break;
                }
-               vp->vp_integer = mip_spi;
+               vp->vp_uint32 = mip_spi;
                break;
 
        case 4:                 /* CMIP6 */
@@ -361,7 +361,7 @@ static rlm_rcode_t CC_HINT(nonnull) mod_post_auth(void *instance, UNUSED void *t
                        RWDEBUG("Failed creating WiMAX-MN-hHA-MIP6-SPI");
                        break;
                }
-               vp->vp_integer = mip_spi + 2;
+               vp->vp_uint32 = mip_spi + 2;
                break;
 
        default:
@@ -397,7 +397,7 @@ static rlm_rcode_t CC_HINT(nonnull) mod_post_auth(void *instance, UNUSED void *t
                if (!vp) {
                        RWDEBUG("Failed creating WiMAX-FA-RK-SPI");
                } else {
-                       vp->vp_integer = mip_spi;
+                       vp->vp_uint32 = mip_spi;
                }
        }
 
@@ -425,7 +425,7 @@ static rlm_rcode_t CC_HINT(nonnull) mod_post_auth(void *instance, UNUSED void *t
                 *      WiMAX-HA-RK-Key-Requested
                 */
                vp = fr_pair_find_by_num(request->packet->vps, VENDORPEC_WIMAX, 58, TAG_ANY);
-               if (vp && (vp->vp_integer == 1)) {
+               if (vp && (vp->vp_uint32 == 1)) {
                        RDEBUG("Client requested HA-RK: Should use IP to look it up from storage");
                }
        }
index 8b9cbc74cb2b7d0b47c0e5fb3fcee69e101e2b3f..0466e0d65efa87edb046421bacb93949683bb031 100644 (file)
@@ -90,7 +90,7 @@ rlm_rcode_t rlm_yubikey_decrypt(rlm_yubikey_t const *inst, REQUEST *request, cha
 
                return RLM_MODULE_FAIL;
        }
-       vp->vp_integer = timestamp;
+       vp->vp_uint32 = timestamp;
 
        /*
         *      Token random
@@ -101,7 +101,7 @@ rlm_rcode_t rlm_yubikey_decrypt(rlm_yubikey_t const *inst, REQUEST *request, cha
 
                return RLM_MODULE_FAIL;
        }
-       vp->vp_integer = token.rnd;
+       vp->vp_uint32 = token.rnd;
 
        /*
         *      Combine the two counter fields together so we can do
@@ -113,7 +113,7 @@ rlm_rcode_t rlm_yubikey_decrypt(rlm_yubikey_t const *inst, REQUEST *request, cha
 
                return RLM_MODULE_FAIL;
        }
-       vp->vp_integer = counter;
+       vp->vp_uint32 = counter;
 
        /*
         *      Now we check for replay attacks
@@ -124,9 +124,9 @@ rlm_rcode_t rlm_yubikey_decrypt(rlm_yubikey_t const *inst, REQUEST *request, cha
                return RLM_MODULE_OK;
        }
 
-       if (counter <= vp->vp_integer) {
+       if (counter <= vp->vp_uint32) {
                REDEBUG("Replay attack detected! Counter value %u, is lt or eq to last known counter value %u",
-                       counter, vp->vp_integer);
+                       counter, vp->vp_uint32);
                return RLM_MODULE_REJECT;
        }
 
index cf13f15c76a7368d9f21870110c1268a5682b1ae..32c7927c192faeb49cc5ef74af9483f48810517a 100644 (file)
@@ -314,7 +314,7 @@ static rlm_rcode_t CC_HINT(nonnull) mod_authorize(void *instance, UNUSED void *t
        dval = fr_dict_enum_by_name(NULL, fr_dict_attr_by_num(NULL, 0, PW_AUTH_TYPE), inst->name);
        if (dval) {
                vp = radius_pair_create(request, &request->control, PW_AUTH_TYPE, 0);
-               vp->vp_integer = dval->value;
+               vp->vp_uint32 = dval->value;
        }
 
        return RLM_MODULE_OK;
index a298d9869db3ba5150141ad6f8f7c06970a3e94b..509ee3b7870e2cd3f4193ccc0aa90422bcac318b 100644 (file)
@@ -1341,7 +1341,7 @@ ssize_t fr_radius_decode_pair_value(TALLOC_CTX *ctx, vp_cursor_t *cursor, fr_dic
                break;
 
        case FR_TYPE_UINT8:
-               vp->vp_byte = p[0];
+               vp->vp_uint8 = p[0];
                break;
 
        case FR_TYPE_UINT16:
@@ -1349,8 +1349,8 @@ ssize_t fr_radius_decode_pair_value(TALLOC_CTX *ctx, vp_cursor_t *cursor, fr_dic
                break;
 
        case FR_TYPE_UINT32:
-               memcpy(&vp->vp_integer, p, 4);
-               vp->vp_integer = ntohl(vp->vp_integer);
+               memcpy(&vp->vp_uint32, p, 4);
+               vp->vp_uint32 = ntohl(vp->vp_uint32);
                break;
 
        case FR_TYPE_UINT64:
@@ -1390,9 +1390,9 @@ ssize_t fr_radius_decode_pair_value(TALLOC_CTX *ctx, vp_cursor_t *cursor, fr_dic
                memcpy(&vp->vp_ip, &tmp_prefix, sizeof(vp->vp_ip));
                break;
 
-       case FR_TYPE_INT32:     /* overloaded with vp_integer */
-               memcpy(&vp->vp_integer, p, 4);
-               vp->vp_integer = ntohl(vp->vp_integer);
+       case FR_TYPE_INT32:     /* overloaded with vp_uint32 */
+               memcpy(&vp->vp_uint32, p, 4);
+               vp->vp_uint32 = ntohl(vp->vp_uint32);
                break;
 
        default:
index 9112b3db99e2522a1631f503928512331e7f815b..c8e05ce751e5cb614d034803b7820b0c7342d30c 100644 (file)
@@ -457,11 +457,11 @@ ssize_t fr_radius_encode_value_hton(uint8_t *out, size_t outlen, VALUE_PAIR cons
                break;
 
        case FR_TYPE_BOOL:
-               out[0] = vp->vp_byte & 0x01;
+               out[0] = vp->vp_uint8 & 0x01;
                break;
 
        case FR_TYPE_UINT8:
-               out[0] = vp->vp_byte & 0xff;
+               out[0] = vp->vp_uint8 & 0xff;
                break;
 
        case FR_TYPE_UINT16:
@@ -470,7 +470,7 @@ ssize_t fr_radius_encode_value_hton(uint8_t *out, size_t outlen, VALUE_PAIR cons
                break;
 
        case FR_TYPE_UINT32:
-               lvalue = htonl(vp->vp_integer);
+               lvalue = htonl(vp->vp_uint32);
                memcpy(out, &lvalue, sizeof(lvalue));
                break;