fr_dict_attr_autoload_t libfreeradius_radius_dict_attr[] = {
{ .out = &attr_packet_type, .name = "Packet-Type", .type = FR_TYPE_UINT32, .dict = &dict_radius },
{ .out = &attr_packet_authentication_vector, .name = "Packet-Authentication-Vector", .type = FR_TYPE_OCTETS, .dict = &dict_radius },
- { .out = &attr_raw_attribute, .name = "Raw-Attribute", .type = FR_TYPE_OCTETS, .dict = &dict_freeradius },
{ .out = &attr_chap_challenge, .name = "CHAP-Challenge", .type = FR_TYPE_OCTETS, .dict = &dict_radius },
{ .out = &attr_chargeable_user_identity, .name = "Chargeable-User-Identity", .type = FR_TYPE_OCTETS, .dict = &dict_radius },
while ((vp = fr_cursor_current(&cursor))) {
VP_VERIFY(vp);
- /*
- * Ignore non-wire attributes, but allow extended
- * attributes.
- */
- if (vp->da->flags.internal) {
-#ifndef NDEBUG
- /*
- * Permit the admin to send BADLY formatted
- * attributes with a debug build.
- */
- if (vp->da == attr_raw_attribute) {
- CHECK_FREESPACE(vp->vp_length, vp->vp_length);
-
- /*
- * Skip really badly formatted attributes
- */
- if (vp->vp_length > (RADIUS_MAX_STRING_LENGTH + 2)) {
- fr_cursor_next(&cursor);
- continue;
- }
-
- FR_DBUFF_IN_MEMCPY_RETURN(&work_dbuff, vp->vp_octets, vp->vp_length);
- fr_cursor_next(&cursor);
- continue;
- }
-#endif
- /*
- * Skip internal attributes...
- */
- fr_cursor_next(&cursor);
- continue;
- }
-
/*
* Encode an individual VP
*/
match Packet-Type = Access-Request, Packet-Authentication-Vector = 0x00000000000000000000000000000000, Tag-1 = { Tunnel-Type = PPTP, Tunnel-Medium-Type = IPv4 }, Tag-2 = { Tunnel-Type = PPTP }
#
-# This currently fails. :(
+# and we encode the tags in order in the packet.
#
-#encode-proto -
-#match 01 00 00 14 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+encode-proto -
+match 01 00 00 26 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 06 01 00 00 01 41 06 01 00 00 01 40 06 02 00 00 01
# Invalid tag on decoding
decode-pair 40 06 20 00 00 01
match Tunnel-Client-Endpoint = "\001\002\003"
count
-match 42
+match 44