aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-radius.c
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2017-08-07 17:51:08 +0100
committerJoão Valverde <j@v6e.pt>2017-08-07 17:00:01 +0000
commit82ef9377fe88c213c5e5a02279d2714f88add665 (patch)
tree21bb5e66896a44ab0547f6e4128bc094e6dfc7ed /epan/dissectors/packet-radius.c
parent4855ae29508e8a659b3620fab93c4138fd7ed4f6 (diff)
RADIUS: Minor cleanup
Have "avp_is_extended" fully control extended attribute properties. including "long-extended". Change-Id: I73b3636b08fe088b7dc4113b1b4144a97bc59efa Reviewed-on: https://code.wireshark.org/review/22989 Reviewed-by: João Valverde <j@v6e.pt>
Diffstat (limited to 'epan/dissectors/packet-radius.c')
-rw-r--r--epan/dissectors/packet-radius.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/epan/dissectors/packet-radius.c b/epan/dissectors/packet-radius.c
index 8c41019246..719fc4f3a0 100644
--- a/epan/dissectors/packet-radius.c
+++ b/epan/dissectors/packet-radius.c
@@ -1467,10 +1467,10 @@ dissect_attribute_value_pairs(proto_tree *tree, packet_info *pinfo, tvbuff_t *tv
if (avp_is_extended) {
avp_length -= 1;
offset += 1;
- }
- if (RADIUS_ATTR_TYPE_IS_EXTENDED_LONG(avp_type0)) {
- avp_length -= 1;
- offset += 1;
+ if (RADIUS_ATTR_TYPE_IS_EXTENDED_LONG(avp_type0)) {
+ avp_length -= 1;
+ offset += 1;
+ }
}
if (avp_type0 == RADIUS_ATTR_TYPE_VENDOR_SPECIFIC || (avp_is_extended && avp_type1 == RADIUS_ATTR_TYPE_VENDOR_SPECIFIC)) {
@@ -1509,10 +1509,10 @@ dissect_attribute_value_pairs(proto_tree *tree, packet_info *pinfo, tvbuff_t *tv
if (avp_is_extended) {
proto_tree_add_item(vendor_tree, hf_radius_avp_extended_type, tvb, vendor_offset, 1, ENC_BIG_ENDIAN);
vendor_offset += 1;
- }
- if (RADIUS_ATTR_TYPE_IS_EXTENDED_LONG(avp_type0)) {
- proto_tree_add_item(vendor_tree, hf_radius_avp_extended_more, tvb, vendor_offset, 1, ENC_BIG_ENDIAN);
- vendor_offset += 1;
+ if (RADIUS_ATTR_TYPE_IS_EXTENDED_LONG(avp_type0)) {
+ proto_tree_add_item(vendor_tree, hf_radius_avp_extended_more, tvb, vendor_offset, 1, ENC_BIG_ENDIAN);
+ vendor_offset += 1;
+ }
}
proto_tree_add_uint_format_value(vendor_tree, hf_radius_avp_vendor_id, tvb, vendor_offset, 4, vendor_id, "%s (%u)", vendor_str, vendor_id);
vendor_offset += 4;
@@ -1706,9 +1706,9 @@ dissect_attribute_value_pairs(proto_tree *tree, packet_info *pinfo, tvbuff_t *tv
if (avp_is_extended) {
proto_tree_add_item(avp_tree, hf_radius_avp_extended_type, tvb, avp_offset_start+2, 1, ENC_BIG_ENDIAN);
- }
- if (RADIUS_ATTR_TYPE_IS_EXTENDED_LONG(avp_type0)) {
- proto_tree_add_item(avp_tree, hf_radius_avp_extended_more, tvb, avp_offset_start+3, 1, ENC_BIG_ENDIAN);
+ if (RADIUS_ATTR_TYPE_IS_EXTENDED_LONG(avp_type0)) {
+ proto_tree_add_item(avp_tree, hf_radius_avp_extended_more, tvb, avp_offset_start+3, 1, ENC_BIG_ENDIAN);
+ }
}
if (avp_type0 == RADIUS_ATTR_TYPE_EAP_MESSAGE) {