aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2017-07-27 19:01:02 +0100
committerAnders Broman <a.broman58@gmail.com>2017-08-16 08:09:11 +0000
commit71dd3658b727489a75c068d7bc8170078c9582a6 (patch)
tree22aa979859f7b6bde1157417703b3c0162bc4e93 /epan/dissectors
parent4319b35e2bdf7aede32db3e81830b68ef37fa4b9 (diff)
RADIUS: Add preference to disable RFC 6929 extended attributes
This is an ugly workaround for the fact that attributes 241-246 are currently hardcoded as extended type. This is to restore previous functionality to dissect some Ascend AVPs that shouldn't be using the IANA allocation space. Ping-Bug: 11630 Change-Id: I6bebefd21fe5149f5f57b3280c9992a0eca85e62 Reviewed-on: https://code.wireshark.org/review/22972 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors')
-rw-r--r--epan/dissectors/packet-radius.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/epan/dissectors/packet-radius.c b/epan/dissectors/packet-radius.c
index a570d311b0..e1d89c6661 100644
--- a/epan/dissectors/packet-radius.c
+++ b/epan/dissectors/packet-radius.c
@@ -229,6 +229,7 @@ static dissector_handle_t radius_handle;
static const gchar *shared_secret = "";
static gboolean validate_authenticator = FALSE;
static gboolean show_length = FALSE;
+static gboolean disable_extended_attributes = FALSE;
static guint8 authenticator[AUTHENTICATOR_LENGTH];
@@ -1428,6 +1429,11 @@ dissect_attribute_value_pairs(proto_tree *tree, packet_info *pinfo, tvbuff_t *tv
avp_type.u8_code[0] = avp_type0;
avp_type.u8_code[1] = avp_type1;
+ if (disable_extended_attributes) {
+ avp_is_extended = FALSE;
+ avp_type.u8_code[1] = 0;
+ }
+
if (avp_length < 2) {
proto_tree_add_expert_format(tree, pinfo, &ei_radius_invalid_length, tvb, offset, 0,
"AVP too short: length %u < 2", avp_length);
@@ -2828,6 +2834,9 @@ proto_register_radius(void)
prefs_register_bool_preference(radius_module, "show_length", "Show AVP Lengths",
"Whether to add or not to the tree the AVP's payload length",
&show_length);
+ prefs_register_bool_preference(radius_module, "disable_extended_attributes", "Disable extended attribute space (RFC 6929)",
+ "Whether to interpret 241-246 as extended attributes according to RFC 6929",
+ &disable_extended_attributes);
prefs_register_obsolete_preference(radius_module, "request_ttl");
radius_tap = register_tap("radius");